Search Postgresql Archives

Re: Per-session data?

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

 



Steve Atkins wrote:
> I need to keep a small amount of information (things like a unique
> session identifier, the application - as opposed to database -
> username and so on) that is local to each database session. It needs
> to be visible from within plpgsql trigger functions and will be used
> on a large fraction of updates.

>   Create a temporary table at the beginning of each session
> containing the data, and simply read it out of that, relying on the
> temporary table to be session-local.

This is exactly how you should do it.


---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

[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