Re: schema level variables and deferrable unique constraints

From: Joe Conway <mail(at)joeconway(dot)com>
To: Andre <andre(at)abs(dot)ee>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Paramveer(dot)Singh(at)trilogy(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: schema level variables and deferrable unique constraints
Date: 2004-09-20 17:55:56
Message-ID: 414F19AC.8040809@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andre wrote:
> Package variables are not transactional, additionaly they are
> session based - each session has it's own variables(values).
> You can assign initial(defult) values in package spec.
> Using table for them would also imply several columns
> for each datatype or several tables for them.

I did a crude implementation of session variables for my OSCON tutorial
which can be found here:
http://www.joeconway.com/tut_oscon_2004.pdf
See the slides with myfunc_setvar(), myfunc_getvar(), and myfunc_rmvar().

I have a slightly improved version that I'm using on a production system
with good results. You can get the tarball here:

http://www.joeconway.com/pgsession.tar.gz

There was another implementation of session variables based on shared
memory floating around the lists somewhere. You might try searching the
archives for that also.

HTH,

Joe

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2004-09-20 18:11:35 Re: schema level variables and deferrable unique constraints
Previous Message Fx 2004-09-20 17:32:09 How to change/replace an in-memory palloced tuple- tuple data