Re: Traversing the catalog using heap_open, systable_beginscan, ... - Mailing list pgsql-interfaces

From Tom Lane
Subject Re: Traversing the catalog using heap_open, systable_beginscan, ...
Date
Msg-id 20630.1384221794@sss.pgh.pa.us
Whole thread Raw
In response to Re: Traversing the catalog using heap_open, systable_beginscan, ...  (Mark Crosland <mark.crosland@gmail.com>)
List pgsql-interfaces
Mark Crosland <mark.crosland@gmail.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



pgsql-interfaces by date:

Previous
From: Mark Crosland
Date:
Subject: Re: Traversing the catalog using heap_open, systable_beginscan, ...
Next
From: "Hoon H."
Date:
Subject: Is it safe to use fundamental type OIDs defined in server/catalog/pg_type.h from client?