From: Joel Richard <postgres@joelrichard.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: sql pgsql <pgsql-sql@postgresql.org>
Subject: Re: Converting from MS Access field aliases
Date: Thu, 12 Jul 2007 13:36:05 -0400
Message-ID: <C4D5DABE-81DC-4926-A096-0EA33B44B793@joelrichard.com> (raw)
In-Reply-To: <634.1184260980@sss.pgh.pa.us>
References: <746273.93291.qm@web54305.mail.re2.yahoo.com>
<634.1184260980@sss.pgh.pa.us>
On Jul 12, 2007, at 1:23 PM, Tom Lane wrote:
> chester c young <chestercyoung@yahoo.com> writes:
>>> SELECT field1 / 2 AS foo,
>>> field2 * 2 AS bar,
>>> foo + bar AS total
>>> WHERE foo < 12;
>
>> First, I think it would be great if this worked - like the alias
>> to an
>> update table added in 8.2 - saves a lot of typing and makes queries
>> much more readable.
>
> This is not an "extension", it is *directly* contrary to both the
> letter
> and spirit of the SQL standard. I can hardly believe that M$ did that
> ... oh, actually, I can entirely believe it. The OP has a serious
> problem of vendor lockin now, and that's exactly what M$ wants.
>
> regards, tom lane
Hear hear!
What's really screwy is what I found when I hooked access into my
PostgreSQL database using pgsqlODBC (I know, it's an abomination) and
I logged the statements that PostgreSQL was processing. In MS Access
this query:
SELECT foo AS bar, bar * 2 AS gleep FROM table;
became this in PostgreSQL's logs
SELECT foo FROM table;
Vewwy Intewesting! I think Microsoft and ODBC might be making extra
work for themselves (obviously they are since they are allowing these
aliases) Or maybe not. Maybe I can glean something from this. Who knows.
--Joel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: postgres@joelrichard.com, tgl@sss.pgh.pa.us
Subject: Re: Converting from MS Access field aliases
In-Reply-To: <C4D5DABE-81DC-4926-A096-0EA33B44B793@joelrichard.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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