From: Philippe Lang <philippe.lang@attiksystem.ch>
To: pgsql-sql@postgresql.org
Subject: Re: function expression in FROM may not refer to other relations of same query level
Date: Thu, 12 Aug 2004 09:35:01 +0200
Message-ID: <6C0CF58A187DA5479245E0830AF84F420803B7@poweredge.attiksystem.ch> (raw)
> > The problem now is that get_lines is being called twice per line.
>
> Is get_lines() defined as IMMUTABLE? Should it be?
I have tried defining get_lines as "IMMUTABLE", or "WITH (iscachable)",
but it keeps on getting called twice per line in the following query...
select
id,
usr,
code,
(get_lines(code)).line1,
(get_lines(code)).line2
from tbl;
I wish there was a way to run the query like this:
select
id,
usr,
code,
CAST(get_lines(code) as lines)
from tbl;
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: philippe.lang@attiksystem.ch
Subject: Re: function expression in FROM may not refer to other relations of same query level
In-Reply-To: <6C0CF58A187DA5479245E0830AF84F420803B7@poweredge.attiksystem.ch>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox