On Tue, 29 Nov 2022 at 03:00, Peter Eisentraut <peter.eisentr...@enterprisedb.com> wrote: > Fixed in new patch.
There seems to be a small bug in the pg_strtointXX functions in the code that checks that there's at least 1 digit. This causes 0x to be a valid representation of zero. That does not seem to be allowed by the parser, so I think we should likely reject it in COPY too. -- Does not work. postgres=# select 0x + 1; ERROR: invalid hexadecimal integer at or near "0x" LINE 1: select 0x + 1; postgres=# create table a (a int); CREATE TABLE -- probably shouldn't work postgres=# copy a from stdin; Enter data to be copied followed by a newline. End with a backslash and a period on a line by itself, or an EOF signal. >> 0x >> \. COPY 1 David