return row from plpgsql?

Поиск
Список
Период
Сортировка
От zhong ming wu
Тема return row from plpgsql?
Дата
Msg-id 9e434c4d1003161756g3432e15dm1593552d3f428be9@mail.gmail.com
обсуждение исходный текст
Ответы Re: return row from plpgsql?  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
Список pgsql-general
Hello

I have tried to return rowtypes and record from plpgsql
but they don't look like anything what is returned from select a,b,c
from table d;

My application is for dovecot imap server userdb where I can only put
one sql statement
to retrieve a few items.  I need to perform some logic in retrieving
and my work-around currently is something like
   select functiona(a.b) as home,functionb(b.c) as mail from sometable
a, sometable b where a.id=b.id and a.email='%u'

I prefer to do this simply as

  select aplpgsqlfunction('%u')

The only way it comes close to this postgres documentation is by using
view but it's not possible within my imap server
requirement.

Thanks for any suggestion or at least confirmation that it's not
possible with plpgsql

mr.wu

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

Предыдущее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: app table names
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: app table names