return row from plpgsql? - Mailing list pgsql-general

From zhong ming wu
Subject return row from plpgsql?
Date
Msg-id 9e434c4d1003161756g3432e15dm1593552d3f428be9@mail.gmail.com
Whole thread Raw
Responses Re: return row from plpgsql?  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
List 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 by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: app table names
Next
From: "Joshua D. Drake"
Date:
Subject: Re: app table names