Problems w/ Temp Tables

Поиск
Список
Период
Сортировка
От brian stapel
Тема Problems w/ Temp Tables
Дата
Msg-id BAY107-W46BB63598F78ABE38127BA1AD0@phx.gbl
обсуждение исходный текст
Ответы Re: Problems w/ Temp Tables
Re: Problems w/ Temp Tables
Список pgsql-novice

Thanks for your time.

 

I have an access/VBA system accessing data stored in a PostGRESQL db via functions.  One of the function uses temporary tables.  If I execute the function repeatedly via my vba code, I receive an error.  I found the following item on a PostGRESQL FAQ that describes my problem:

 

4.19) Why do I get "relation with OID ##### does not exist" errors when accessing temporary tables in PL/PgSQL functions?

PL/PgSQL caches function scripts, and an unfortunate side effect is that if a PL/PgSQL function accesses a temporary table, and that table is later dropped and recreated, and the function called again, the function will fail because the cached function contents still point to the old temporary table. The solution is to use EXECUTE for temporary table access in PL/PgSQL. This will cause the query to be reparsed every time.

 

Can you tell me where should I implement the EXECUTE commands - in my function or with in my vba code?  My vba code typically uses - SELECT * from {function name}({parameters} to execute the postgresql function.

 

Thanks again.


View Athletes' Collections with Live Search. See it!

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

Предыдущее
От: "Duncan Garland"
Дата:
Сообщение: Re: [SPAM] Restore single table from pg_dumpall.
Следующее
От: Alan Hodgson
Дата:
Сообщение: Re: Problems w/ Temp Tables