From: | "Merlin Moncure" <merlin(dot)moncure(at)rcsonline(dot)com> |
---|---|
To: | <Bob(dot)Henkel(at)hartfordlife(dot)com> |
Cc: | <pgsql-hackers-win32(at)postgresql(dot)org> |
Subject: | Re: table alias |
Date: | 2004-05-25 14:20:54 |
Message-ID: | 6EE64EF3AB31D5448D0007DD34EEB34101AE37@Herge.rcsinc.local |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers-win32 |
> I'm running a binary snapshot from two days ago. When I run a update
with
> aliases the SQL doesn't work. The alias does work if I run just a
select
> statement however. Is this suppose to be like this. If not is it
only
> broken in the 7.5 WIN32 build?
Look at the grammar for select and update (\h update, \h select) in
psql. You will notice that select has grammar for alias, update does
not
where from_item can be one of:
[ ONLY ] table_name [ * ] [ [ AS ] alias [ ( column_alias [, ...] )
] ]
( select ) [ AS ] alias [ ( column_alias [, ...] ) ]
function_name ( [ argument [, ...] ] ) [ AS ] alias [ ( column_alias
[, ...] | column_definition
there is no reason to alias the update statement because you can only
specify one table, so it is not really necessary to prefix each column
with the table name (and thus no reason for an alias). I didn't check,
but the unix version almost certainly works the same
Merlin
From | Date | Subject | |
---|---|---|---|
Next Message | Bob.Henkel | 2004-05-25 14:43:47 | Re: table alias |
Previous Message | Bob.Henkel | 2004-05-25 13:36:32 | table alias |