Re: Fix PL/Python metadata when there is no result

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Fix PL/Python metadata when there is no result
Дата
Msg-id 19975.1331156958@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Fix PL/Python metadata when there is no result  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: Fix PL/Python metadata when there is no result
Список pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> On ons, 2012-03-07 at 15:59 -0500, Tom Lane wrote:
>> Or are we talking about two different things?

> I think so.  I'm wondering here how to detect whether the execution of a
> statement has yielded a result set at all.  (For example, you ran SELECT
> or INSERT ... RETURNING, versus CREATE TABLE or VACUUM.)

Got it.  I agree that throwing an error for resultset property inquiries
is reasonable in such cases, as long as there is some non-error-throwing
way to test whether a resultset was returned or not.

Still, it seems rather arbitrary to say that the row count property is
the thing to test for that purpose and no other is.  Why not return None
for any property that's not sensible?
        regards, tom lane


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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Fix PL/Python metadata when there is no result
Следующее
От: Thom Brown
Дата:
Сообщение: Re: Command Triggers, patch v11