PG Bug reporting form <noreply@postgresql.org> writes:
> When installed Postgresql 12.3 for testing purposes we have discovered
> following possible bug:
> Character "8" (different from standard number 8) is treated as a number by
> regular expression
> ~'\d+'
> but can not be converted to numeric by
> ::numeric
I see no reason to consider this a bug.
The set of characters matched by \d is, as documented, dependent on
your collation choice or locale settings (LC_CTYPE in particular).
We are not going to try to guess at what random Unicode glyphs might
be included in a particular locale, much less make numeric_in take
them all.
If you want to know whether a string is acceptable to numeric_in
I'd suggest writing something based around [0-9] not \d.
regards, tom lane