Re: How to determine the table a query or a views columns come from? - Mailing list pgsql-general

From Frank Church
Subject Re: How to determine the table a query or a views columns come from?
Date
Msg-id 1141649184.440c2f209c3f5@webmail.adontendev.net
Whole thread Raw
In response to Re: How to determine the table a query or a views columns come from?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: How to determine the table a query or a views columns  (Chris <dmagick@gmail.com>)
List pgsql-general
Quoting Tom Lane <tgl@sss.pgh.pa.us>:

Can this info be obtained by querying the system tables,
especially in the case of views? I am using 'scripting' languages and using C
will be quite awkward.

I have got to find if libpq's output is exposed in PHP or Ruby.

> Frank Church <pgsql@adontendev.net> writes:
> > Is there way to determine the table a query or a view's columns come from?
>
> Yeah, there's some support for that in the protocol.  libpq exposes it
> as PQftable() and PQftablecol().
>
>             regards, tom lane
>




pgsql-general by date:

Previous
From: Richard Huxton
Date:
Subject: Re: problem with overloading the "coalesce" function
Next
From: DANTE ALEXANDRA
Date:
Subject: Re: Question about the contrib rpm ?