Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vg3K3-0008QT-EM for pgsql-interfaces@arkaria.postgresql.org; Tue, 12 Nov 2013 02:03:19 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Vg3K2-0003oR-UP for pgsql-interfaces@arkaria.postgresql.org; Tue, 12 Nov 2013 02:03:18 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vg3K2-0003oL-BD for pgsql-interfaces@postgresql.org; Tue, 12 Nov 2013 02:03:18 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vg3K0-00074l-2j for pgsql-interfaces@postgresql.org; Tue, 12 Nov 2013 02:03:18 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id rAC23EbW020631; Mon, 11 Nov 2013 21:03:14 -0500 From: Tom Lane To: Mark Crosland cc: pgsql-interfaces@postgresql.org Subject: Re: Traversing the catalog using heap_open, systable_beginscan, ... In-reply-to: References: <31976.1384013537@sss.pgh.pa.us> Comments: In-reply-to Mark Crosland message dated "Mon, 11 Nov 2013 14:01:00 -0800" Date: Mon, 11 Nov 2013 21:03:14 -0500 Message-ID: <20630.1384221794@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-interfaces Precedence: bulk Sender: pgsql-interfaces-owner@postgresql.org Mark Crosland 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