Incorrect format in error message - Mailing list pgsql-hackers

From David Rowley
Subject Incorrect format in error message
Date
Msg-id CAKJS1f9WX9CzkyFV1STTr9NkZBDuXW8e7Ur3PHzQ724HgMv5Gw@mail.gmail.com
Whole thread Raw
Responses Re: Incorrect format in error message
List pgsql-hackers
The attached fixes an error message which is incorrectly using an
unsigned format specifier instead of a signed one.

# create table t ();
# create unique index t_idx on t (ctid);
# alter table t replica identity using index t_idx;
ERROR:  internal column 4294967295 in unique index "t_idx"

I was just going to submit a patch to change the %u to a %d, but this
error message should use ereport() instead of elog(), so I fixed that
up too and added the missing regression test.

I picked ERRCODE_INVALID_COLUMN_REFERENCE as I thought it was the most
suitable. I'm not sure if it's correct though.

--
 David Rowley                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: OOM in libpq and infinite loop with getCopyStart()
Next
From: Thomas Munro
Date:
Subject: Re: So, can we stop supporting Windows native now?