pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedWhere are aliases stored?
4+ messages / 3 participants
[nested] [flat]
* Where are aliases stored?
@ 2007-04-11 20:14 Chris Hoover <revoohc@gmail.com>
2007-04-12 01:04 ` Re: Where are aliases stored? Robert Treat <xzilla@users.sourceforge.net>
0 siblings, 1 reply; 4+ messages in thread
From: Chris Hoover @ 2007-04-11 20:14 UTC (permalink / raw)
To: pgsql-admin
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.
Thanks,
Chris
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Where are aliases stored?
2007-04-11 20:14 Where are aliases stored? Chris Hoover <revoohc@gmail.com>
@ 2007-04-12 01:04 ` Robert Treat <xzilla@users.sourceforge.net>
2007-04-12 14:46 ` Re: Where are aliases stored? Chris Hoover <revoohc@gmail.com>
0 siblings, 1 reply; 4+ messages in thread
From: Robert Treat @ 2007-04-12 01:04 UTC (permalink / raw)
To: pgsql-admin; +Cc: Chris Hoover <revoohc@gmail.com>
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
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Where are aliases stored?
2007-04-11 20:14 Where are aliases stored? Chris Hoover <revoohc@gmail.com>
2007-04-12 01:04 ` Re: Where are aliases stored? Robert Treat <xzilla@users.sourceforge.net>
@ 2007-04-12 14:46 ` Chris Hoover <revoohc@gmail.com>
2007-04-12 15:35 ` Re: Where are aliases stored? Peter Eisentraut <peter_e@gmx.net>
0 siblings, 1 reply; 4+ messages in thread
From: Chris Hoover @ 2007-04-12 14:46 UTC (permalink / raw)
To: Robert Treat <xzilla@users.sourceforge.net>; +Cc: pgsql-admin
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
>
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Where are aliases stored?
2007-04-11 20:14 Where are aliases stored? Chris Hoover <revoohc@gmail.com>
2007-04-12 01:04 ` Re: Where are aliases stored? Robert Treat <xzilla@users.sourceforge.net>
2007-04-12 14:46 ` Re: Where are aliases stored? Chris Hoover <revoohc@gmail.com>
@ 2007-04-12 15:35 ` Peter Eisentraut <peter_e@gmx.net>
0 siblings, 0 replies; 4+ messages in thread
From: Peter Eisentraut @ 2007-04-12 15:35 UTC (permalink / raw)
To: pgsql-admin; +Cc: Chris Hoover <revoohc@gmail.com>; Robert Treat <xzilla@users.sourceforge.net>
Am Donnerstag, 12. April 2007 16:46 schrieb Chris Hoover:
> Is there not a way to query the pg_ catalog views and get a listing of
> views with columns (by alias name)?
The column names (what you call alias names) are in pg_attribute, the views
are in pg_class.
--
Peter Eisentraut
http://developer.postgresql.org/~petere/
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2007-04-12 15:35 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-04-11 20:14 Where are aliases stored? Chris Hoover <revoohc@gmail.com>
2007-04-12 01:04 ` Robert Treat <xzilla@users.sourceforge.net>
2007-04-12 14:46 ` Chris Hoover <revoohc@gmail.com>
2007-04-12 15:35 ` Peter Eisentraut <peter_e@gmx.net>
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