Re: [BUG] views and functions on relations - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [BUG] views and functions on relations
Date
Msg-id 17303.987645726@sss.pgh.pa.us
Whole thread Raw
In response to Re: [BUG] views and functions on relations  (Alex Pilosov <alex@pilosoft.com>)
List pgsql-hackers
Alex Pilosov <alex@pilosoft.com> writes:
> Something (when the query is evaluated, before cust_name function is
> called) sets the tupdesc->natts=0,

FWIW, I have just looked through all the code that sets natts fields,
and I don't believe that any of it can set a tupdesc's natts field to
zero.  Therefore the zeroing must be an accidental stomp of some kind.
Since natts is the first field in a tupdesc, it seems plausible that
this might happen if some bit of code misinterprets a tupdesc pointer
as something else.  However, that makes the odds of finding the problem
by staring at code even lower.  I really need to get after this with
a debugger...

BTW, are you building with --enable-cassert?  If not I strongly recommend
it for chasing this sort of problem.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Re: No printable 7.1 docs?y
Next
From: Philip Warner
Date:
Subject: Re: [BUG?] tgconstrrelid doesn't survive a dump/restore