pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adam Pigg <adam@piggz.fsnet.co.uk>
To: pgsql-interfaces@postgresql.org
Subject: libpq:Find Table Name
Date: Wed, 9 Jul 2003 21:30:07 +0100
Message-ID: <200307092130.07234.adam@piggz.fsnet.co.uk> (raw)

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




view thread (6+ messages)  latest in thread

Message-ID: <200307092130.07234.adam@piggz.fsnet.co.uk>
Permalink:  ../200307092130.07234.adam@piggz.fsnet.co.uk/
Also on:    postgresql.org/message-id/200307092130.07234.adam@piggz.fsnet.co.uk

 · 

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: adam@piggz.fsnet.co.uk
  Subject: Re: libpq:Find Table Name
  In-Reply-To: <200307092130.07234.adam@piggz.fsnet.co.uk>

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

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