Re: Urgent help needed- alias name in update statement - Mailing list pgsql-general

From Albe Laurenz
Subject Re: Urgent help needed- alias name in update statement
Date
Msg-id D960CB61B694CF459DCFB4B0128514C2039381EB@exadv11.host.magwien.gv.at
Whole thread Raw
In response to Urgent help needed- alias name in update statement  (venkatrao.b@tcs.com)
List pgsql-general
Venkat wrote:
> In postgre, when i am trying to give alias name in update
> statement like below -
>
> ---------------------------------
> update mytable x
> set x.name = 'asdf'
> where x.no = 1
> -------------------------------
>
>
> is giving error - mytable is not having col x.
>
> We have migrated code from oracle to postgre 8.4. Is there
> any solution for this.
> (functions were compiled without any compilation errors - now
> when we are trying to run these we are getting problems)

The name is PostgreSQL or Postgres.

I looked at the syntax of the UPDATE statement as specified by
the SQL standard, and it says in Part 2, chapters 14.11 and 14.12,
that PostgreSQL is behaving in the standard-conforming way.

If you use nonstandard SQL extensions of a database vendor,
portability will suffer, which is neither Oracle's nor
PostgreSQL's fault.

I guess you'll have to rewrite those UPDATE statements.

Yours,
Laurenz Albe

pgsql-general by date:

Previous
From: Andre Lopes
Date:
Subject: Re: How to? Timestamp with timezone.
Next
From: Ivan Sergio Borgonovo
Date:
Subject: make available C extensions to others