Re: proposal for 8.3: Simultaneous assignment for PL/pgSQL

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: proposal for 8.3: Simultaneous assignment for PL/pgSQL
Дата
Msg-id BAY20-F81A5372970215FA984CD2F9570@phx.gbl
обсуждение исходный текст
Ответ на Re: proposal for 8.3: Simultaneous assignment for  (andrew@dunslane.net)
Ответы Re: proposal for 8.3: Simultaneous assignment for PL/pgSQL
Список pgsql-hackers
>
>Tom Lane wrote:
> > "Pavel Stehule" <pavel.stehule@hotmail.com> writes:
> >> a,b,c := out3fce(1); -- Simultaneous assignment
> >
> > I thought we rejected that idea once already, on the grounds that it
> > would make it too hard to tell the difference between intended code
> > and typos.
> >
>
>In any case, I had some questions:
>
>. is it compatible with PLSQL?

what I know no, but PLSQL has different mechanism for calling procedures. 
And first of all it knows references to variables.

>. can the effect be achieved by assigning to a composite?
>

yes. I can use record type. But here is problem with less readability

The best of is implementation of CALL statement, where I can transmit values 
"by" references. But it's not possible in Postgres :-(. I can't to select 
unambiguously called procedure. "I can, if I accept SQL Server syntax, where 
caller specify OUT, INOUT, IN flags too". I am unhappy with current 
situation, and I search good solution. Simultaneous assignment  is simplest.

Regards
Pavel Stehule

_________________________________________________________________
Emotikony a pozadi programu MSN Messenger ozivi vasi konverzaci. 
http://messenger.msn.cz/



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

Предыдущее
От: "Pavel Stehule"
Дата:
Сообщение: Re: proposal for PL packages for 8.3.
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: proposal for 8.3: Simultaneous assignment for PL/pgSQL