Re: select, columns, and aliases

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: CSN <cool_screen_name90001(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: select, columns, and aliases
Date: 2004-07-23 15:49:49
Message-ID: 20040723154949.GA17787@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Jul 23, 2004 at 02:48:01 -0700,
CSN <cool_screen_name90001(at)yahoo(dot)com> wrote:
> Is it possible to automatically prefix a table alias
> (or table name or something else even) to each column
> in a select list? For example:
>
> select a.*, b.*
> from tablea a
> inner tableb b
> on a.id=b.aid;
>
> results:
>
> a_id, a_name, b_id, b_name, b_aid

I don't know of any Postgres feature that allows for computed aliases
at the SQL level. If the SQL is being generated by a program, the
program could potentially do this for you.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2004-07-23 17:43:33 Re: Connexion to Postgresql using TCP/IP
Previous Message Secrétariat 2004-07-23 15:23:32 Re: Connexion to Postgresql using TCP/IP