Re: My query table aliases don't exist in my application

From: Hugo Garza <hiro2k(at)gmail(dot)com>
To: Maciek Sakrejda <msakrejda(at)truviso(dot)com>
Cc: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: My query table aliases don't exist in my application
Date: 2011-02-02 17:03:08
Message-ID: AANLkTiknR7yUeK+VUPGFVuQonMoMkfyZ90oyOtU8sSXE@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Thank you guys, I will have to update my program code. But it makes a lot
more sense to have the columns with more signifcant names.

On Tue, Feb 1, 2011 at 4:52 PM, Maciek Sakrejda <msakrejda(at)truviso(dot)com>wrote:

> Right. Even if you explicitly include the table alias, PostgreSQL
> strips it out before sending column metadata, so according to the
> server, the column name of
>
> SELECT x.a FROM foo x;
>
> is just "a", not "x.a". The driver is just playing along. If you
> really like the alias names, you can use the somewhat perverse
>
> SELECT x.a as "x.a" FROM foo x;
>
> ---
> Maciek Sakrejda | System Architect | Truviso
>
> 1065 E. Hillsdale Blvd., Suite 215
> Foster City, CA 94404
> www.truviso.com
>

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message yazan suleiman 2011-02-02 19:38:17 Slow statement when using JDBC
Previous Message Kevin Grittner 2011-02-02 00:49:12 Re: Timing of notice delivery