Problem when truncate table and get the OID from PQftable

Started by Rodrigo Morenoalmost 22 years ago2 messagesbugs
Jump to latest
#1Rodrigo Moreno
rodrigo.miguel@terra.com.br

Hi

After truncate the table, the oid retuned by PQftable/libpq returns the old
value, and i'm not able to find it in pg_class, because the value of
pg_class.relfilenode was changed after the truncate.

The problem is only solved if i drop the table and re-creating again.

Regards
Rodrigo Moreno

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Rodrigo Moreno (#1)
Re: Problem when truncate table and get the OID from PQftable

"Rodrigo Moreno" <rodrigo.miguel@terra.com.br> writes:

After truncate the table, the oid retuned by PQftable/libpq returns the old
value, and i'm not able to find it in pg_class, because the value of
pg_class.relfilenode was changed after the truncate.

Why are you matching it against relfilenode? It is the OID.

regards, tom lane