Re: Traversing the catalog using heap_open, systable_beginscan, ...

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mark Crosland <mark(dot)crosland(at)gmail(dot)com>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: Traversing the catalog using heap_open, systable_beginscan, ...
Date: 2013-11-12 02:03:14
Message-ID: 20630.1384221794@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Mark Crosland <mark(dot)crosland(at)gmail(dot)com> writes:
> Thanks, that helps. I can get table and column info from the catalog now.
> What is the recommended way (structs to access via one of the scan/modify
> callbacks?) to retrieve the column, operation and value, "col", "=" and
> "val" in this example. And is the same method used for both queries and
> updates?
> select * from table where col=val

contrib/postgres_fdw might be a useful example for you. A lot of this
stuff isn't documented terribly well, you just have to look for some
example code that does what you want to do.

regards, tom lane

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message Hoon H. 2013-12-05 20:43:13 Is it safe to use fundamental type OIDs defined in server/catalog/pg_type.h from client?
Previous Message Mark Crosland 2013-11-11 22:01:00 Re: Traversing the catalog using heap_open, systable_beginscan, ...