Re: Global/persistent variables

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

Thanks for all answers!

Unfortunatly, faking them with some C functions would be very complex
because in this application's case most of this variables are record
types and some are arrays (pl/tables)... :-(

It seems that creating temp tables (and some api functions) would be a
little bit easier to implement. One concern would be about preformance:
I guess that temp tables are written to disk and fetched as any other
table but discarded in the end of the session.

Any suggestion or comments?

Thanks again,
Ronnie

Joe Conway escreveu em 6/1/2005 21:57:

> 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
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly

Attachment Content-Type Size
ronnie.vcf text/x-vcard 356 bytes

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Geoffrey 2005-01-07 13:58:26 Re: Books for experienced DB developer
Previous Message Алексей Ш. 2005-01-07 11:29:00 Get execution plan of dynamic query