Re: Global/persistent variables

From: Joe Conway <mail(at)joeconway(dot)com>
To: Ronnie Meier Ramos <ronnie(at)viler(dot)com(dot)br>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Global/persistent variables
Date: 2005-01-06 23:57:33
Message-ID: 41DDD06D.9030202@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ronnie Meier Ramos wrote:
> AFAIK PG doesn't have packages - this is not a problem since I can
> handle it with different schemas or some naming convention, but is there
> a way to declare persistent variables (that would be "visible" to any
> function up to the end of the session) ?

You might be able to fake it with some C functions. See:

http://www.joeconway.com/myfunc.tgz

Look at myfunc_setvar(), myfunc_getvar(), and myfunc_rmvar().

HTH,

Joe

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Aaron Steele 2005-01-07 01:32:30 Re: warning: pg_query(): Query failed
Previous Message Bruno Wolff III 2005-01-06 23:08:34 Re: warning: pg_query(): Query failed