Tom Lane wrote:

Andrew Dunstan <[EMAIL PROTECTED]> writes:
Every perl module whose author wants strict mode (and they all should) has to carry such a declaration, so in a sense we'd just be doing what perl itself does, and by trying to provide a global switch we're being unperlish.

You missed my point.  I wasn't objecting to having the global switch,
only to the fact that turning it on and off doesn't do what a rational
person would expect.  If it's going to advertise itself as USERSET then
it darn well ought to be settable.

The idea of loading the strict module unconditionally seems ok to me,
if we can work out a way of making it apply or not apply to individual
function compilations.  From what you were saying, perhaps it would
work to implicitly add "strict->import();" when use_strict is enabled?

        

I am pretty sure we could load it unconditionally without disturbing anything (because of the scope rules), and then import it appropriately.

Do you expect turning it on to affect only future compilations? Or should we recompile every function already compiled in the present backend? I can see arguments either way. What about if we turn it off? In theory, anything that works with it turned on should work fine with it turned off, although the reverse is not true of course ...

And yes, you're right, we could have 4 functions instead of two: {safe,unsafe} x {strict, unstrict}.

cheers

andrew

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

              http://www.postgresql.org/docs/faq

Reply via email to