Newbie question: returning rowtypes from a plpgsql function

Поиск
Список
Период
Сортировка
От Larry White
Тема Newbie question: returning rowtypes from a plpgsql function
Дата
Msg-id d15ea14a041130181068dc87bc@mail.gmail.com
обсуждение исходный текст
Ответы Re: Newbie question: returning rowtypes from a plpgsql function  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
I wrote a function that returns a rowtype.  The rowtype is assigned a
value by a query using SELECT INTO.  The query sometimes will return
no rows.  When it does, the function's return value is a row with no
values.

I would have expected it to return 0 rows, like the query itself.  Am
I doing something wrong or is this the expected behavior?  Is there a
standard way to code around this?  I expected my client code to check
the number of rows returned to decide what to do next.

thanks

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

Предыдущее
От: Joel
Дата:
Сообщение: Re: USENET vs Mailing Lists Poll ...
Следующее
От: "Guy Rouillier"
Дата:
Сообщение: Using default tablespace for database?