Re: PL/pgSQL PERFORM with CTE

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: PL/pgSQL PERFORM with CTE
Дата
Msg-id 27815.1377214532@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: PL/pgSQL PERFORM with CTE  (Josh Berkus <josh@agliodbs.com>)
Список pgsql-hackers
Josh Berkus <josh@agliodbs.com> writes:
> I have to agree with Merlin.  I've always thought the PERFORM thing was
> a wart we'd get around to removing eventually.  In what way is it a feature?

I'd always assumed it was a PL/SQL compatibility thing, but a look in a
PL/SQL reference doesn't turn up any such statement.  So far as I can see,
the situation in Oracle PL/SQL is:
* SELECT must have an INTO clause;
* there isn't any way to execute a SELECT and just discard the result.

Jan might remember more about his thought process here, but I'm thinking
that he copied the SELECT-must-have-INTO rule and then chose to invent
a new statement for the case of wanting to discard the result.  I think
you could make an argument for that being good from an oversight-detection
standpoint, but it's not a really strong argument.  Particularly in view
of the difficulty we'd have in supporting WITH ... PERFORM ... nicely,
it doesn't seem unreasonable to just allow SELECT-without-INTO.
        regards, tom lane



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

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Re: PL/pgSQL PERFORM with CTE
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: PL/pgSQL PERFORM with CTE