Re: subqueries

From: Roman Neuhauser <neuhauser(at)sigpipe(dot)cz>
To: Tomasz Grobelny <tomasz(at)grobelny(dot)oswiecenia(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: subqueries
Date: 2005-06-20 09:07:55
Message-ID: 20050620090755.GB9956@isis.sigpipe.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

# tomasz(at)grobelny(dot)oswiecenia(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tomasz Grobelny 2005-06-20 11:31:43 Re: subqueries
Previous Message Jacob Atzen 2005-06-20 08:54:52 Re: Backing up multiple databases