Skip site navigation (1) Skip section navigation (2)

Re: Problem when truncate table and get the OID from PQftable

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Rodrigo Moreno" <rodrigo(dot)miguel(at)terra(dot)com(dot)br>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Problem when truncate table and get the OID from PQftable
Date: 2004-04-28 04:45:00
Message-ID: 23189.1083127500@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
"Rodrigo Moreno" <rodrigo(dot)miguel(at)terra(dot)com(dot)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

In response to

pgsql-bugs by date

Next:From: C9 DeveloperDate: 2004-04-28 16:27:53
Subject: Bug in functions returning setof where table has dropped column
Previous:From: Tom LaneDate: 2004-04-28 04:38:58
Subject: Re: make check regression "test stats" failed

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group