From: | Rory Campbell-Lange <rory(at)campbell-lange(dot)net> |
---|---|
To: | Oisin Glynn <me(at)oisinglynn(dot)com> |
Cc: | Postgresql General List <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Select from function for part of column results |
Date: | 2005-02-03 21:13:57 |
Message-ID: | 20050203211357.GB25698@campbell-lange.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi Oisin
On 03/02/05, Oisin Glynn (me(at)oisinglynn(dot)com) wrote:
> I have something simlar working on windows in V 8.0
> My select loks like:
>
> SELECT *,function_message_context(inbox.rowid) from inbox;
This works great for a function returning a single column. I'm not sure
how to do it with a function returning more than one column.
st4=> select *, fn_message_context(n_id) from inbox;
ERROR: cannot display a value of type record
Rory
> ----- Original Message -----
> From: "Rory Campbell-Lange" <rory(at)campbell-lange(dot)net>
> To: "Postgresql General List" <pgsql-general(at)postgresql(dot)org>
> Sent: Thursday, February 03, 2005 15:04
> Subject: [GENERAL] Select from function for part of column results
>
> > I've written a function to provide information relating to each row in
> > an inbox. I'd like to do a query returning some information from each
> > row of the inbox + some columns from the function pertinent to each row
> > returned.
> >
> > I've tried the following on 7.4.6:
> >
> > t4=> select * from function_message_context(inbox.rowid), inbox;
> > ERROR: function expression in FROM may not refer to other
> > relations of same query level
> >
> > Is there a way I can get the function to provide some columns in the
> > query?
--
Rory Campbell-Lange
<rory(at)campbell-lange(dot)net>
<www.campbell-lange.net>
From | Date | Subject | |
---|---|---|---|
Next Message | Oleg Bartunov | 2005-02-03 21:23:02 | Re: Eeek! Major problem after reload with tsearch2 |
Previous Message | Tom Lane | 2005-02-03 21:06:47 | Re: Eeek! Major problem after reload with tsearch2 |