Re: patch for EXECUTE .. INTO (from TODO)

Поиск
Список
Период
Сортировка
От Neil Conway
Тема Re: patch for EXECUTE .. INTO (from TODO)
Дата
Msg-id 1117698971.2605.33.camel@localhost.localdomain
обсуждение исходный текст
Ответ на patch for EXECUTE .. INTO (from TODO)  (Pavel Stehule <stehule@kix.fsv.cvut.cz>)
Список pgsql-patches
On Wed, 2005-06-01 at 11:30 +0200, Pavel Stehule wrote:
>     I did small trivial patch (almost all was written) for storing
> result from executing dynamic query into ROW or RECORD variable.

Cool, this will be useful. A few minor comments:

The patch needs some regression tests.

I'm not sure the parser modifications are quite right -- these
statements are treated as identical:

  EXECUTE 'SELECT (row).* from (select row(10,1)::fxx) s'; _r;
  EXECUTE 'SELECT (row).* from (select row(10,1)::fxx) s' INTO _r;

Accepting the former as valid syntax might mean misinterpreting some
function definitions (for example, EXECUTE '...'; var := 5). If you use
read_sql_construct() directly, you can use the *endtoken out parameter
to check whether the parser saw an INTO or a semicolon, and only look
for a following variable in the former case. In any case there's not
much point in defining plpgsql_read_expression2(), the rest of gram.y
just uses read_sql_construct() directly.

-Neil



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

Предыдущее
От: "Andrew Dunstan"
Дата:
Сообщение: Re: COPY fast parse patch
Следующее
От: Neil Conway
Дата:
Сообщение: Re: return_next for plperl (was Re: call for help)