agora inbox for pgsql-interfaces@postgresql.org  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Mark Crosland <mark.crosland@gmail.com>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: Traversing the catalog using heap_open, systable_beginscan, ...
Date: Mon, 11 Nov 2013 21:03:14 -0500
Message-ID: <20630.1384221794@sss.pgh.pa.us> (raw)
In-Reply-To: <CAJjS_dPv2JerM5d=yfDHif0M+VHRcsNwFuvRtLEDmGWpp-OGpA@mail.gmail.com>
References: <CAJjS_dOXaAkKRoso1J3ShQXoBmA=SFxtiN9vNqGHq9fn4bbYhw@mail.gmail.com>
	<31976.1384013537@sss.pgh.pa.us>
	<CAJjS_dPv2JerM5d=yfDHif0M+VHRcsNwFuvRtLEDmGWpp-OGpA@mail.gmail.com>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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


-- 
Sent via pgsql-interfaces mailing list (pgsql-interfaces@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-interfaces



view thread (4+ messages)

Message-ID: <20630.1384221794@sss.pgh.pa.us>
Permalink:  ../20630.1384221794@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/20630.1384221794@sss.pgh.pa.us

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: tgl@sss.pgh.pa.us, mark.crosland@gmail.com
  Subject: Re: Traversing the catalog using heap_open, systable_beginscan, ...
  In-Reply-To: <20630.1384221794@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox