Problem with temporary table -- Urgent
От | Vijay Kumar |
---|---|
Тема | Problem with temporary table -- Urgent |
Дата | |
Msg-id | 000801c346be$cf166db0$cf01a8c0@vijay обсуждение исходный текст |
Ответы |
Re: Problem with temporary table -- Urgent
Re: Problem with temporary table -- Urgent |
Список | pgsql-sql |
Hi,
We are using postgresql 7.3.3, we are encountering the following problems when we used temporary tables.
Here with i'm sending my Sample function.
create or replace function TestTemp_refcur(refcursor) returns refcursor As '
declare
refc alias for $1;
lString Varchar(4000);
begin
lString := '' CREATE OR REPLACE FUNCTION TESTTEMP() RETURNS varchar as ''''
declare
refc alias for $1;
lString Varchar(4000);
begin
lString := '' CREATE OR REPLACE FUNCTION TESTTEMP() RETURNS varchar as ''''
BEGIN '';
lString := lString || '' create temporary table temp_Table( Name Numeric);'';
lString := lString || '' create temporary table temp_Table( Name Numeric);'';
lString := lString || '' insert into temp_Table values (1); '';
lString := lString || '' insert into temp_Table values (2);'';
lString := lString || '' return null; end;'''' language ''''plpgsql'''';'';
raise notice '' Notice is % '', lString;
execute lString;
open refc for select * from temp_Table;
return refc;
end;
' language 'plpgsql';
execute lString;
open refc for select * from temp_Table;
return refc;
end;
' language 'plpgsql';
begin;
select TestTemp_refcur('funcursor');
fetch all in funcursor;
commit;
select TestTemp_refcur('funcursor');
fetch all in funcursor;
commit;
psql:test18.sql:25: WARNING: Error occurred while executing PL/pgSQL function t
esttemp_refcur
psql:test18.sql:25: WARNING: line 20 at open
psql:test18.sql:25: ERROR: Relation "temp_table" does not exist
psql:test18.sql:26: ERROR: current transaction is aborted, queries ignored unti
l end of transaction block
Kindly guide as to solve this problem....
Any help will be highly appreciated........
Thanks & Regards
Vijay
В списке pgsql-sql по дате отправления: