Search Postgresql Archives

Temp tables as session var containers

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

 



Hi,

I've seen the session variable question pop up a fair bit on this list. The temporary table solution seems good but I've got a question before using it...

- My app creates a temp table for session vars
- UPDATE, INSERT and DELETE triggers on tables use this data

My question is:

If I run a query directly through the psql command line tool (or another app that doesn't setup this temp table) that temp table wont exist.

How can I write the trigger function to detect the absence of the temp table and deal with it gracefully? I think I need some SQL to determine which pg_temp_N schema belongs to my session.

Is this possible?

TIA,
James

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@xxxxxxxxxxxxxx

[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