On Thu, Apr 25, 2013 at 1:17 AM, Darren Duncan dar...@darrenduncan.netwrote:
On 2013.04.24 7:16 PM, � wrote:
Maybe you must see this extension [1] ;-)
[1]
http://pgxn.org/dist/session_**variables/http://pgxn.org/dist/session_variables/
Fabrízio de Royes Mello
Thanks for your response.
Hello,
I would like to have one or more session-scoped global variables that are
useable in a similar way to sequence generators, via analogies to
setval()+currval().
Here's a (simplified) scenario ...
Say that for auditing purposes all regular database tables have a changeset_id
column,
Hello
You could just use temporary tables like:
BEGIN;
CREATE TEMPORARY TABLE csid (i int);
-- somehow write the ID you want into that table
-- and then...
INSERT INTO other_table (changeset_ids, msg) VALUES
((SELECT i FROM csid), 'Some log message');
COMMIT;
When
Thank you for that.
I had actually thought of this, but it seemed to me that using a temporary table
was a heavy-handed approach and that a temporary scalar variable would be more
efficient or less verbose to use.
It is *a* solution certainly, and potentially a better one than the url I
On Wed, Apr 24, 2013 at 9:47 PM, Darren Duncan dar...@darrenduncan.netwrote:
Thank you for that.
I had actually thought of this, but it seemed to me that using a temporary
table was a heavy-handed approach and that a temporary scalar variable
would be more efficient or less verbose to use.
On 2013.04.24 7:16 PM, � wrote:
Maybe you must see this extension [1] ;-)
[1] http://pgxn.org/dist/session_variables/
Fabrízio de Royes Mello
Thanks for your response.
/*
* Author: Fabrízio de Royes Mello
* Created at: Thu Oct 27 14:37:36 -0200 2011
*
*/
CREATE FUNCTION
Is there any way to define custom variables per session scope?
In oracle, we do this using package variables.
Basically when a user logs into our application, it generates one-time
session information that we want to make available to all the procedures
and triggers, without passing it directly
Adam Rich wrote:
Is there any way to define custom variables per session scope?
In oracle, we do this using package variables.
This would be so cool to have.
--
Kenneth Downs
Secure Data Software, Inc.
www.secdat.com / www.andromeda-project.org
Office: 631-689-7200 Cell: 631-379-0010
On Fri, Mar 02, 2007 at 01:53:28PM -0600, Adam Rich wrote:
Is there any way to define custom variables per session scope?
You can have them in PL/Perl(U), PL/Tcl(U) and PL/PythonU and other
such PLs, and you can create SQL accessors for them.
Cheers,
D
--
David Fetter [EMAIL PROTECTED]
David Fetter [EMAIL PROTECTED] writes:
On Fri, Mar 02, 2007 at 01:53:28PM -0600, Adam Rich wrote:
Is there any way to define custom variables per session scope?
You can have them in PL/Perl(U), PL/Tcl(U) and PL/PythonU and other
such PLs, and you can create SQL accessors for them.
Another
Any way to pull the value of a config variable
into a pl/pgsql variable?
-Original Message-
From: Tom Lane [mailto:[EMAIL PROTECTED]
Sent: Friday, March 02, 2007 3:46 PM
To: David Fetter
Cc: Adam Rich; pgsql-general@postgresql.org
Subject: Re: [GENERAL] Custom session variables
Adam Rich [EMAIL PROTECTED] writes:
Any way to pull the value of a config variable
into a pl/pgsql variable?
current_setting(), or select from the pg_settings view.
regards, tom lane
---(end of broadcast)---
TIP 1: if
12 matches
Mail list logo