Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id BB95D9FBA03 for ; Thu, 12 Apr 2007 11:46:36 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 97258-09 for ; Thu, 12 Apr 2007 11:46:27 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.225]) by postgresql.org (Postfix) with ESMTP id C069A9FB8DD for ; Thu, 12 Apr 2007 11:46:27 -0300 (ADT) Received: by wx-out-0506.google.com with SMTP id i28so524939wxd for ; Thu, 12 Apr 2007 07:46:26 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=WyMKkmpvZi6Fwv9K9d4nugh28TJjRYBr2yrXMaJ4Bs71KC8/NO84vft2GT9yrxIN62+ARi0wzFrNxyOH8gNm1KZ7CyPCGx/aaWPGJ/MBO2vYalreW1ze5viUIIp3lynR6spVyE8t1R7OQt/gXkSVOHcJ4EE/w6lhnJgKt8/gRLI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=N956xo84Q5cp5n+V08jehRh9hSL/9L9lXysaP+g4DxTXUwV8oSCpIEI3LzitRAEckPJneXAu3CoZg/6ZbOeB7G8JQVeVCUU6rK1Pqwz0qfXm8wuKCKRQSMeBQlrHTZCvCRe4amkGrAl3jcBwZW4mYqQXbF3OQGMUUa7rhyCkkbA= Received: by 10.100.144.11 with SMTP id r11mr1394259and.1176389186018; Thu, 12 Apr 2007 07:46:26 -0700 (PDT) Received: by 10.100.165.19 with HTTP; Thu, 12 Apr 2007 07:46:25 -0700 (PDT) Message-ID: <1d219a6f0704120746ld395edfk624f5f5d2cd5e0cd@mail.gmail.com> Date: Thu, 12 Apr 2007 10:46:25 -0400 From: "Chris Hoover" To: "Robert Treat" Subject: Re: Where are aliases stored? Cc: pgsql-admin@postgresql.org In-Reply-To: <200704112104.55584.xzilla@users.sourceforge.net> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_22433_16862047.1176389185978" References: <1d219a6f0704111314v5fb773fdoc6bccb67b5289e31@mail.gmail.com> <200704112104.55584.xzilla@users.sourceforge.net> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200704/122 X-Sequence-Number: 25186 ------=_Part_22433_16862047.1176389185978 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Thanks, but this does not meet my needs. Is there not a way to query the pg_ catalog views and get a listing of views with columns (by alias name)? i.e. create view asdf as select xyz as test1 from bogus_table; I need a query that says: view|column|alias asdf|xyz|test1 Thanks, Chris On 4/11/07, Robert Treat wrote: > > On Wednesday 11 April 2007 16:14, Chris Hoover wrote: > > I'm trying to pull a listing of views with the columns and column > aliases. > > However, I must be blind, and can't find what system view has the alias > for > > the columns of the view. Would someone please enlighten me. > > > > See pg_catalog.pg_views.definition. > > -- > Robert Treat > Build A Brighter LAMP :: Linux Apache {middleware} PostgreSQL > ------=_Part_22433_16862047.1176389185978 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Thanks, but this does not meet my needs.

Is there not a way to query the pg_ catalog views and get a listing of views with columns (by alias name)?

i.e.

create view asdf as
select xyz as test1 from bogus_table;

I need a query that says:
view|column|alias
asdf|xyz|test1

Thanks,

Chris

On 4/11/07, Robert Treat < xzilla@users.sourceforge.net> wrote:
On Wednesday 11 April 2007 16:14, Chris Hoover wrote:
> I'm trying to pull a listing of views with the columns and column aliases.
> However, I must be blind, and can't find what system view has the alias for
> the columns of the view.  Would someone please enlighten me.
>

See pg_catalog.pg_views.definition.

--
Robert Treat
Build A Brighter LAMP :: Linux Apache {middleware} PostgreSQL

------=_Part_22433_16862047.1176389185978--