return row from plpgsql?

From: zhong ming wu <mr(dot)z(dot)m(dot)wu(at)gmail(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: return row from plpgsql?
Date: 2010-03-17 00:56:29
Message-ID: 9e434c4d1003161756g3432e15dm1593552d3f428be9@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message A. Kretschmer 2010-03-17 06:03:24 Re: return row from plpgsql?
Previous Message Joshua D. Drake 2010-03-16 23:38:13 Re: app table names