Re: PL/pgSQL proposal: using list of scalars in assign stmts, fore and fors stmts

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: PL/pgSQL proposal: using list of scalars in assign stmts, fore and fors stmts
Дата
Msg-id 23657.1135270824@sss.pgh.pa.us
обсуждение исходный текст
Ответ на PL/pgSQL proposal: using list of scalars in assign stmts, fore and fors stmts  ("Pavel Stehule" <pavel.stehule@hotmail.com>)
Список pgsql-hackers
"Pavel Stehule" <pavel.stehule@hotmail.com> writes:
> <for> := FOR <target> IN {SELECT | EXECUTE} ... LOOP
> <target> := {row|record|comma separated list of scalar vars}

This part seems all right to me.

> <assign> := <target2> ':=' <expression>
> <target2> := {row|record|variable|'ROW(' comma separated list of scalar vars 
> ')'}

As I already said on -patches, I consider this a bad idea.  It's too
error prone (because there's no easy way of seeing what the field order
will be).  And it doesn't add anything that you can't do now.  I think
a series of "var = rec.field" assignments is a preferable way to do it.
        regards, tom lane


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

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Unsplitting btree index leaf pages
Следующее
От: Tom Lane
Дата:
Сообщение: Re: WAL bypass for INSERT, UPDATE and DELETE?