Re: Generalized query to determine the table a query or a view's columns come from?

From: Bob Hairgrove <invalid_at_bigfoot.com>
Date: Sat, 04 Mar 2006 00:45:17 +0100
Message-ID: <gukh02hrsl2fqo2e7qn8b9dsdfh5r5jlv8_at_4ax.com>


On 3 Mar 2006 15:32:21 -0800, "professor chen" <mydejamail_at_yahoo.co.uk> wrote:

>Is there way to determine the table a query or a view's columns come
>from?
>
>I am looking for something like that in postgresql. If it doesn't exist
>is there
>some generalized SQL that can parse the query or view's definition and
>retrieve
>the list.
>
>something like
>
>column name | actual column name | source table | actual source table
>
>column name is either the original name or an alias for it, and so is
>source
>table.

Try the SQL command "describe xxx" and substitute the view name (perhaps prefixed by the schema name) for xxx.

--
Bob Hairgrove
NoSpamPlease_at_Home.com
Received on Sat Mar 04 2006 - 00:45:17 CET

Original text of this message