On 04.07.2011 16:07, Peter Geoghegan wrote:
On 4 July 2011 13:53, Magnus Hagander<mag...@hagander.net> wrote:
This code is no longer present in git head, *removed* by commit
426cafc. Not added by it. at least that's how I read the history...
However, it still looks to me like we could get to that code with
con=NULL - if the while loop is never executed. Perhaps this is a
can-never-happen situation? Alvaro?
Seems slightly academic IMHO. No code path should dereference an
invariably NULL or wild pointer.
That error message is bogus anyway:
if (!found)
ereport(ERROR,
(errcode(ERRCODE_UNDEFINED_OBJECT),
errmsg("constraint \"%s\" of domain \"%s\" does not
exist",
constrName,
NameStr(con->conname))));
It passes con->conname as the name of the domain, which is just wrong.
It should be TypeNameToString(typename) instead. The second error
message that follows has the same bug.
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers