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

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

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

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Kevin Grittner 2011-02-01 23:51:33 Timing of notice delivery
Previous Message Kevin Grittner 2011-02-01 22:48:00 Re: My query table aliases don't exist in my application