Re: Urgent help needed- alias name in update statement

From: "Albe Laurenz" <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: <venkatrao(dot)b(at)tcs(dot)com>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: Urgent help needed- alias name in update statement
Date: 2010-03-10 09:32:19
Message-ID: D960CB61B694CF459DCFB4B0128514C2039381EB@exadv11.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-novice

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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ivan Sergio Borgonovo 2010-03-10 11:54:18 make available C extensions to others
Previous Message Andre Lopes 2010-03-10 09:00:18 Re: How to? Timestamp with timezone.

Browse pgsql-novice by date

  From Date Subject
Next Message Joshua Tolley 2010-03-10 18:30:11 Re: Slony vs Pgpool
Previous Message Machiel Richards 2010-03-10 07:42:26 Slony vs Pgpool