libpq:Find Table Name

From: Adam Pigg <adam(at)piggz(dot)fsnet(dot)co(dot)uk>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: libpq:Find Table Name
Date: 2003-07-09 20:30:07
Message-ID: 200307092130.07234.adam@piggz.fsnet.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

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(at)piggz(dot)fsnet(dot)co(dot)uk
adam(at)adampigg(dot)9p(dot)org(dot)uk

Browse pgsql-interfaces by date

  From Date Subject
Next Message GB Clark 2003-07-09 23:41:03 Using DBD::Pg CVS with 7.4Devel
Previous Message Bruce Momjian 2003-07-08 22:40:49 Re: DBD::Pg 1.30_1 WAS (Re: Prepare and prepare ?)