Re: Running a PL/pgSQL function

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Running a PL/pgSQL function
Дата
Msg-id 24322.1218505385@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Running a PL/pgSQL function  (Christophe <xof@thebuild.com>)
Список pgsql-general
Christophe <xof@thebuild.com> writes:
> I'm startled that I've never done this before, but...  I have a PL/
> pgSQL function that takes no arguments, returns VOID, and has a bunch
> of side effects on the database.  The correct way of invoking this
> function is:
>     SELECT my_func();
> ... yes?  Thanks; it seems to work fine, but using SELECT here is
> causing some part of my brain to scream "counter-intuitive."

Yeah, it is a little weird but it works fine.  We treat VOID as a
more-or-less-real datatype that has only one value, an empty string...

            regards, tom lane

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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Running a PL/pgSQL function
Следующее
От: "Scott Marlowe"
Дата:
Сообщение: Re: Running a PL/pgSQL function