Search Postgresql Archives

Re: subqueries

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



# tomasz@xxxxxxxxxxxxxxxxxxxxxxx / 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

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
      joining column's datatypes do not match

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux