Re: BUG #16512: Character considered as a number by regex but can not convert to numeric
| От | Tom Lane |
|---|---|
| Тема | Re: BUG #16512: Character considered as a number by regex but can not convert to numeric |
| Дата | |
| Msg-id | 2355328.1593178382@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | BUG #16512: Character considered as a number by regex but can not convert to numeric (PG Bug reporting form <noreply@postgresql.org>) |
| Ответы |
Re: BUG #16512: Character considered as a number by regex but can not convert to numeric
|
| Список | pgsql-bugs |
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
В списке pgsql-bugs по дате отправления: