Re: [HACKERS] proposal: custom variables management

2007-03-05 Thread David Fetter
On Mon, Mar 05, 2007 at 06:54:36PM -0500, Andrew Dunstan wrote: > Tom Lane wrote: > >Andrew Dunstan <[EMAIL PROTECTED]> writes: > > > >>If you think there's a case for some extra functionality to be > >>exposed, maybe you could provide some more examples / use cases. > > > >I think what Pavel is

Re: [HACKERS] proposal: custom variables management

2007-03-05 Thread Pavel Stehule
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 op

Re: [HACKERS] proposal: custom variables management

2007-03-05 Thread Tom Lane
Andrew Dunstan <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> ... So it's really a pretty poor fit. If we want to support >> general-purpose intrasession variables, I think something other than GUC >> ought to be providing 'em. (And, of course, it seems likely that you >> could provide such fun

Re: [HACKERS] proposal: custom variables management

2007-03-05 Thread Andrew Dunstan
Tom Lane wrote: Andrew Dunstan <[EMAIL PROTECTED]> writes: If you think there's a case for some extra functionality to be exposed, maybe you could provide some more examples / use cases. I think what Pavel is on about is making use of not-known-to-C-code custom variables as all-purpos

Re: [HACKERS] proposal: custom variables management

2007-03-05 Thread Tom Lane
Andrew Dunstan <[EMAIL PROTECTED]> writes: > If you think there's a > case for some extra functionality to be exposed, maybe you could provide > some more examples / use cases. I think what Pavel is on about is making use of not-known-to-C-code custom variables as all-purpose intrasession storag

Re: [HACKERS] proposal: custom variables management

2007-03-05 Thread Andrew Dunstan
Pavel Stehule wrote: ISTM you are trying to do too much. We need to get the base functionality, as described by Tom in the thread I referred you to, working first. Extra stuff could be added later if necessary. cheers I don't wont to build cathedral. Now is time for discussion, no? I am

Re: [HACKERS] proposal: custom variables management

2007-03-05 Thread Pavel Stehule
ISTM you are trying to do too much. We need to get the base functionality, as described by Tom in the thread I referred you to, working first. Extra stuff could be added later if necessary. cheers I don't wont to build cathedral. Now is time for discussion, no? I am collect any arguments.

Re: [HACKERS] proposal: custom variables management

2007-03-05 Thread Andrew Dunstan
Pavel Stehule wrote: "Pavel Stehule" <[EMAIL PROTECTED]> writes: > * reset_custom_variable(cusvar); ... set default from postgresql.conf > * revoke_custom_variable(READ|MODIFY, cusvar, roleid); > * grant_custom_variable(READ|MODIFY, cusvar, roleid); This seems pointlessly complex. An unprivi

Re: [HACKERS] proposal: custom variables management

2007-03-05 Thread Pavel Stehule
"Pavel Stehule" <[EMAIL PROTECTED]> writes: > * reset_custom_variable(cusvar); ... set default from postgresql.conf > * revoke_custom_variable(READ|MODIFY, cusvar, roleid); > * grant_custom_variable(READ|MODIFY, cusvar, roleid); This seems pointlessly complex. An unprivileged user can only SE

Re: [HACKERS] proposal: custom variables management

2007-03-05 Thread Tom Lane
"Pavel Stehule" <[EMAIL PROTECTED]> writes: > * reset_custom_variable(cusvar); ... set default from postgresql.conf > * revoke_custom_variable(READ|MODIFY, cusvar, roleid); > * grant_custom_variable(READ|MODIFY, cusvar, roleid); This seems pointlessly complex. An unprivileged user can only SET t