8000 regexp_replace silently ignores errors in the regexp pattern · Issue #16340 · duckdb/duckdb · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
regexp_replace silently ignores errors in the regexp pattern #16340
Closed
@hbirler

Description

@hbirler

What happens?

regexp_replace silently returns the original string if the regexp pattern contains errors.
This is not the case for regexp_matches.

To Reproduce

regexp_replace seems to ignore errors:

select regexp_replace('abc', '*', 'X');

Postgres throws an error: "invalid regular expression"
DuckDB returns abc

But regexp_matches properly throws errors:

select regexp_matches('abc', '*');

DuckDB and Postgres both complain about the invalid regular expression.

OS:

Ubuntu

DuckDB Version:

v1.2.1-dev629 d9ee15f

DuckDB Client:

shell

Hardware:

No response

Full Name:

Altan Birler

Affiliation:

TUM

What is the latest build you tested with? If possible, we recommend testing with the latest nightly build.

I have tested with a source build

Did you include all relevant data sets for reproducing the issue?

Yes

Did you include all code required to reproduce the issue?

  • Yes, I have

Did you include all relevant configuration (e.g., CPU architecture, Python version, Linux distribution) to reproduce the issue?

  • Yes, I have

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0