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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Omar Eljumaily <omar2(at)omnicode(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Problem with oids for table names getting out of sync?
Date: 2007-04-05 05:10:19
Message-ID: 18930.1175749819@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Omar Eljumaily <omar2(at)omnicode(dot)com> writes:
> I've run into this sort of obscure problem. I'm using libpq with a
> front end database api where I need to track column names and how
> they're returned in libpq queries. What's happening is that I start out
> with a set of table names when I open my database with a query:

> SELECT relfilenode, relname FROM pg_class WHERE relname !~ '^(pg_|sql_)'
> AND relkind = 'r'

> But these don't agree with the oids when I subsequently fetch my rows
> and use the following:

> Oid o = PQftable(_res, i);

Um ... are you laboring under some delusion about relfilenode being the
same as relation OID?

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Postgres User 2007-04-05 05:23:20 Granting permissions
Previous Message Nikolay Moskvichev 2007-04-05 04:25:59 Re: Storing blobs in PG DB