Re: PL/pgSQL 'i = i + 1' Syntax

Поиск
Список
Период
Сортировка
От Hannu Krosing
Тема Re: PL/pgSQL 'i = i + 1' Syntax
Дата
Msg-id 1147944154.3831.11.camel@localhost.localdomain
обсуждение исходный текст
Ответ на Re: PL/pgSQL 'i = i + 1' Syntax  ("Albe Laurenz" <all@adv.magwien.gv.at>)
Список pgsql-hackers
Ühel kenal päeval, N, 2006-05-18 kell 09:28, kirjutas Albe Laurenz:
> Josh Berkus wrote:
> >> If you only care about Oracle to PostgreSQL (and who wouldn't?), then  
> >> it in fact seems desirable for PL/pgSQL to be a superset of PL/SQL.
> > 
> > I agree with David here.   We care about the ability to migrate PL/SQL --> 
> > PL/pgSQL.   We do *not* care about the ability to migrate PL/pgSQL --> 
> > PL/SQL.  So supporting extra syntax which Oracle doesn't ... as long as 
> > the Oracle syntax still works ... is in fact a good thing.
> 
> I cannot feel good about deliberately introducing incompatibilities.

I guess that PL/pgSQL will always be "an extended subset" of PL/SQL, and
never be direct replacement, so I dont see another extension as
introducing incompatibilities.

> If assignment by '=' gets documented and known, it will get used.
> This in turn will make PL/pgSQL less familiar for PL/SQL coders.
> And that will make them more reluctant to change over.

Someone else using = instead of := is the least of their worries when
switching to PostgreSQL (and you cant switch to PL/pgSQL without
switching to PostgreSQL). 

PostgreSQL generally behaves differently on much deeper levels,
sometimes better sometimes worse. And you need to optimise code in
different ways, as much of oracles deep secrets are not applicable to
pg.

> I think it would be best to get a compile error when '=' is used for
> assignment, but if that's too much effort, I believe that the current
> behaviour is acceptable as long as it doesn't get documented and
> 'good practice'.

What does PL/SQL use for assignment inside UPDATE statements ?

Is it "SET A=B" like in SQL or "SET A:=B" like in rest of PL/SQL ?

-- 
----------------
Hannu Krosing
Database Architect
Skype Technologies OÜ
Akadeemia tee 21 F, Tallinn, 12618, Estonia

Skype me:  callto:hkrosing
Get Skype for free:  http://www.skype.com




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Dhanaraj M
Дата:
Сообщение: Re: Clarification required
Следующее
От: "Dave Page"
Дата:
Сообщение: Re: Clarification required