Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Omar Eljumaily <omar2@xxxxxxxxxxxx> 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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux