X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (developer.postgresql.org [64.117.224.193]) by svr1.postgresql.org (Postfix) with ESMTP id 8A045B439D9 for ; Wed, 9 Jul 2003 20:30:50 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr1.postgresql.org [64.117.224.193]) (amavisd-new, port 10024) with ESMTP id 65043-04 for ; Wed, 9 Jul 2003 17:30:18 -0300 (ADT) Received: from cmailm5.svr.pol.co.uk (cmailm5.svr.pol.co.uk [195.92.193.21]) by svr1.postgresql.org (Postfix) with ESMTP id 72F65B439B2 for ; Wed, 9 Jul 2003 17:30:17 -0300 (ADT) Received: from modem-570.lynx.dialup.pol.co.uk ([217.135.194.58]) by cmailm5.svr.pol.co.uk with esmtp (Exim 4.14) id 19aLZw-0000z5-2q for pgsql-interfaces@postgresql.org; Wed, 09 Jul 2003 21:30:16 +0100 From: Adam Pigg To: pgsql-interfaces@postgresql.org Subject: libpq:Find Table Name Date: Wed, 9 Jul 2003 21:30:07 +0100 User-Agent: KMail/1.5.2 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200307092130.07234.adam@piggz.fsnet.co.uk> X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200307/10 X-Sequence-Number: 4324 Hi Am currently writing (or trying to at least) a postgresql driver for the koffice app kexi. The driver requires that i subclass some kexi classes, one being a class that represents a field. I know the SQL statement used to generate the result and for each field inthe result i create an object. However, one property of the object is the table name for the field. Other properties require that i know the table name, eg given the table and field names i can query the system catalogs to get things like contraints. In the my_sql c library, the result (tuble) structure contains a filed structure that contains the table name that the particular field originated in, but libpq doesnt seem to have any similar kind of functionality (and i have looked a lot i think) Has anyone any suggestions on how i can achieve getting the table name for a filed in a result without having to parse the sql statement (which i dont think wold be easy). Regards -- adampigg.9p.org.uk adam@piggz.fsnet.co.uk adam@adampigg.9p.org.uk