Re: constraints & tableoid [pgsql8.1] - Mailing list pgsql-bugs

From Tom Lane
Subject Re: constraints & tableoid [pgsql8.1]
Date
Msg-id 7380.1144763702@sss.pgh.pa.us
Whole thread Raw
In response to Re: constraints & tableoid [pgsql8.1]  (Michael Fuhr <mike@fuhr.org>)
Responses Re: constraints & tableoid [pgsql8.1]  (姜维 <jw.pgsql@sduept.com>)
List pgsql-bugs
Michael Fuhr <mike@fuhr.org> writes:
> Apparently a new row's tableoid isn't set until the row is actually
> inserted.

I believe that's true of all the system columns.  If you're using oid,
for example, that's not assigned either until heap_insert().

This behavior doesn't seem unreasonable to me.  A candidate row is not a
member of the table until *after* it's passed its constraint checks ---
until then, it's just some values sitting in memory.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Michael Fuhr
Date:
Subject: Re: constraints & tableoid [pgsql8.1]
Next
From: 姜维
Date:
Subject: Re: constraints & tableoid [pgsql8.1]