Re: [SQL] Something I'd like to try...

2000-10-03 Thread Tom Lane
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

Re: [SQL] Something I'd like to try...

2000-10-03 Thread Barry Lind
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

Re: [SQL] Something I'd like to try...

2000-10-03 Thread Josh Berkus
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.

Re: [SQL] Something I'd like to try...

2000-10-02 Thread Tom Lane
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 ::=

Re: [SQL] Something I'd like to try...

2000-10-02 Thread Cristóvão Dalla Costa
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

Re: [SQL] Something I'd like to try...

2000-10-02 Thread Bruce Momjian
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, >

[SQL] Something I'd like to try...

2000-06-09 Thread Niall Smart
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