Re: Temporary Tables

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: Temporary Tables
Дата
Msg-id 20030401165857.Y55556-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на Temporary Tables  ("Roman Fail" <rfail@posportal.com>)
Список pgsql-general
On Tue, 1 Apr 2003, Roman Fail wrote:

> I've just written a function in PL/pgSQL that creates two temporary
> tables, then drops them at the end.  For each session, the first time
> I run it works great.  The second time I try it from the same session,
> I get this error:
>
> trans=# SELECT * FROM tranddthistory(6, '2003-03-20', '2003-04-05') AS
> (senddate date, day char(3), filename varchar(40), postingdate date,
> systemdate date) ;
> WARNING:  Error occurred while executing PL/pgSQL function tranddthistory
> WARNING:  line 19 at SQL statement
> ERROR:  pg_class_aclcheck: relation 89979461 not found
> trans=#
>
> I feel pretty confident that I'm doing something wrong with the
> temporary tables.  I've read everything I can find in the docs,
> searched the list archives, and come up empty.  Any ideas?

You need to use execute to work with the temporary table.  Otherwise,
it'll save the query plan which will be invalid after the drop/create.


В списке pgsql-general по дате отправления:

Предыдущее
От: "Roman Fail"
Дата:
Сообщение: Temporary Tables
Следующее
От: Bruno Wolff III
Дата:
Сообщение: Re: Earth distance