From: | "guillermo arias" <guillermoariast(at)linuxwaves(dot)com> |
---|---|
To: | "Alvaro Herrera" <alvherre(at)commandprompt(dot)com> |
Cc: | <lists(at)peufeu(dot)com>, <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: inner join problem with temporary tables |
Date: | 2007-06-14 05:38:43 |
Message-ID: | 20070613223843.22A47C8D@resin18.mta.everyone.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
could you please give me an example?.
How could i make an inner join select with temporary tables?
This function does not work:
REATE OR REPLACE FUNCTION modelo.test2(OUT xart_cod character varying, OUT xart_descri character varying)
RETURNS SETOF record AS
$BODY$
begin
create temp table t_arti as (select art_cod,art_descri from modelo.articulos);
select $1,$2 from t_arti ;
end;
$BODY$
LANGUAGE 'plpgsql' VOLATILE;
this is the error message:
ERROR: query has no destination for result data
SQL state: 42601
Hint: If you want to discard the results of a SELECT, use PERFORM instead.
Context: PL/pgSQL function "test2" line 4 at SQL statement
_____________________________________________________________
Get your FREE, LinuxWaves.com Email Now! --> http://www.LinuxWaves.com
Join Linux Discussions! --> http://Community.LinuxWaves.com
From | Date | Subject | |
---|---|---|---|
Next Message | Jyoti Seth | 2007-06-14 05:47:27 | Re: [SQL] setof or array as input parameter to postgresql 8.2 functions |
Previous Message | Stefan Kaltenbrunner | 2007-06-14 04:45:35 | Re: pointer to feature comparisons, please |