Michael Fuhr <mike(at)fuhr(dot)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