Re: Problem with oids for table names getting out of sync?

From: omar <omar2(at)omnicode(dot)com>
To:
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Problem with oids for table names getting out of sync?
Date: 2007-04-05 14:09:10
Message-ID: 46150306.3060107@omnicode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


>> SELECT relfilenode, relname FROM pg_class WHERE relname !~ '^(pg_|sql_)'
>> AND relkind = 'r'
>>
> Oid o = PQftable(_res, i);
>
>
> Um ... are you laboring under some delusion about relfilenode being the
> same as relation OID?
>
>
Apparently I am. libpq docs claim that "You can query the system table
pg_class to determine exactly which table is referenced." for PQftable.
I query pg_class and the only column that looks remotely like a unique
oid is relfilenode. The other thing is that it works most of the time
and starts to work again when I dump and restore.

Thanks

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jaime Silvela 2007-04-05 14:09:16 Re: Print database name
Previous Message Tomi N/A 2007-04-05 14:01:24 Re: Using C# to create stored procedures