Re: proposal: custom variables management - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: proposal: custom variables management
Date
Msg-id BAY20-F23DFBE091A91A53EEB2B9BF97B0@phx.gbl
Whole thread Raw
In response to Re: proposal: custom variables management  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
>>
>
>I think I agree with you :-)
>
>But then every PL needs to invent it's own variable persistence - maybe we 
>should look at providing a general PL-visible persistence mechanism which 
>is distinct from GUC, so we don't have to keep reinventing the wheel (YAML 
>anyone?).
>

I know, so GUC aren't optimal for it. Any storage of Datum values can be 
better. I am thinking about using one row memory tables (similar ROW type 
from plpgsql). And access via clasic SQL statements. It's need only some 
game with executor and type cache. It can be cheaper than temporary tables 
with same functionality.

Using: * trusted storage for debug info * trusted storage for state variables (vector) * trusted storage for expensive
variables* trusted sharing values between PL
 

>I think the use I had in mind for properly working custom variables fits 
>more squarely with common GUC usage, though.
>

I'll try implement my minimalistic version.

Regards
Pavel Stehule

_________________________________________________________________
Citite se osamele? Poznejte nekoho vyjmecneho diky Match.com. 
http://www.msn.cz/



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Bug: Buffer cache is not scan resistant
Next
From: David Fetter
Date:
Subject: Re: proposal: custom variables management