Re: table.column in query results?

From: "Albe Laurenz" <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: "Andrew Klaassen *EXTERN*" <clawsoon(at)yahoo(dot)com>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: table.column in query results?
Date: 2009-07-23 08:48:36
Message-ID: D960CB61B694CF459DCFB4B0128514C203937E57@exadv11.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Andrew Klaassen wrote:
> Is it possible to get table.column in query results rather
> than just column?
>
> I.e. I'd like:
>
> SELECT * FROM foo, bar;
> foo.id | foo.name | bar.id | bar.text
> -------+----------+--------+---------
> ...
>
> ...rather than:
>
> SELECT * FROM foo, bar;
> id | name | id | text
> ---+------+----+-----
> ...

You'd have to use aliases, like

SELECT id AS "foo.id" ...

Yours,
Laurenz Albe

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Albe Laurenz 2009-07-23 08:50:52 Re: enabling join_collapse_limit for a single query only
Previous Message Massa, Harald Armin 2009-07-23 08:25:41 PostgreSQL 8.4.0-1 windwos crashes when run without admin privs