Re: PL/pgSQL PERFORM with CTE
От | Pavel Stehule |
---|---|
Тема | Re: PL/pgSQL PERFORM with CTE |
Дата | |
Msg-id | CAFj8pRBbu5DvqZgg9TXkNcSwCD4vDa=x2=Uvhb10sfFvPr7T8Q@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: PL/pgSQL PERFORM with CTE (Josh Berkus <josh@agliodbs.com>) |
Список | pgsql-hackers |
2013/8/23 Josh Berkus <josh@agliodbs.com>
Tom,For my own part, I have to correct forgetting to substitute "PERORM" for
> 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.
"SELECT" around 200 times each major PL/pgSQL project. So it would be
user-friendly for it to go away.
But it can have a different reason. In T-SQL (Microsoft or Sybase) or MySQL a unbound query is used to direct transfer data to client side.
There
BEGIN
SELECT 10;
END;
doesn't mean "ignore result of query", but it means push result to client.
And we doesn't support this functionality, so I prefer doesn't allow this syntax.
Regards
Pavel
В списке pgsql-hackers по дате отправления: