Re: subqueries - Mailing list pgsql-general

From Roman Neuhauser
Subject Re: subqueries
Date
Msg-id 20050620090755.GB9956@isis.sigpipe.cz
Whole thread Raw
In response to Re: subqueries  (Tomasz Grobelny <tomasz@grobelny.oswiecenia.net>)
List pgsql-general
# tomasz@grobelny.oswiecenia.net / 2005-06-20 01:02:38 +0200:
> I wanted to define a function like this:
> create or replace function fun(...)...
> create temp table qaz as subquery1;
> create temp table wsx as subquery1;
> select * from qaz, wsx;
> language sql;
> but I get postgresql error saying that relation qaz does not exist. Well it
> doesn't when the function is created but it would exist when it would be
> needed. Note that that set of commands I put as function body works just fine
> (just not in a function).

    http://www.postgresql.org/docs/7.4/static/plpgsql-statements.html#PLPGSQL-STATEMENTS-EXECUTING-DYN

--
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man.  You don't KNOW.
Cause you weren't THERE.             http://bash.org/?255991

pgsql-general by date:

Previous
From: Jacob Atzen
Date:
Subject: Re: Backing up multiple databases
Next
From: Milan Krcmar
Date:
Subject: External (asynchronous) notifications of database updates