Barry Lind <[EMAIL PROTECTED]> writes:
> I have a table that stores a hierarchy. Sometimes in an update I want
> to join back to the same table to get other information related to
> children or parent rows. In Oracle I can do this using the alias, but
> in Postgresql I cannot.
> update table_fo
It is interesting that this should come up now. Just last week I was
trying to port a SQL statement from Oracle to Postgresql that used table
aliases in an update statement. While I can see that this functionality
wouldn't be used very often it can be very useful under certain
circumstances.
I
Tom,
> >> I just noticed that postgres doesn't totally support
> >> column aliases on UPDATE statements, for example
>
> The SQL92 spec very clearly does not allow an alias on the target table:
I have to agree here. The only improvement from a deviation (alllowing
aliasing) would be cosmetic.
Bruce Momjian <[EMAIL PROTECTED]> writes:
> Can someone comment on this?
>>
>> I just noticed that postgres doesn't totally support
>> column aliases on UPDATE statements, for example
The SQL92 spec very clearly does not allow an alias on the target table:
13.10
::=
It seems to me that aliases on updates are something totally superflous.
Since updates always work on one table at a time, why bother especifying the
table each field comes from?
> Can someone comment on this?
>
> > Hi,
> >
> > I just noticed that postgres doesn't totally support
> > column alias
Can someone comment on this?
> Hi,
>
> I just noticed that postgres doesn't totally support
> column aliases on UPDATE statements, for example
>
> UPDATE EMPLOYEES SET
> OFFICE_PHONE = UU.OFFICE_PHONE,
> MOBILE_PHONE = UU.MOBILE_PHONE,
>
Hi,
I just noticed that postgres doesn't totally support
column aliases on UPDATE statements, for example
UPDATE EMPLOYEES SET
OFFICE_PHONE = UU.OFFICE_PHONE,
MOBILE_PHONE = UU.MOBILE_PHONE,
OFFICE_CD = UU.OFFICE_CD,
A