Michael Fuhr <[EMAIL PROTECTED]> writes:
> The attached patch moves the common elements of loose_embedding[]
> and strict_embedding[] to a macro so they can be maintained in
> one place.  As Tom Lane noticed, ::_plperl_to_pg_array was missing
> from strict_embedding[], which appears to be a bug.

Actually, it strikes me that this is working around a problem that
we shouldn't have in the first place: there should not be two different
embedding strings.  I hadn't noticed the use_strict GUC before, but
now that I see it, I think it's implemented in a completely awful
way.  Because the embedding string is only executed once per backend,
it's effectively impossible to change use_strict on the fly.  I think
we should be looking for another implementation of that feature, rather
than just cleaning up the minor breakage.  One would expect changes
in the variable to at least affect future function compilations in
the current backend, if not indeed recompiling already-compiled ones.

I'm not much of a Perl guru, but could we make this happen by having
four functions instead of two?  (mksafefunc, mksafestrictfunc, etc)
I'm not too clear on what the scope of effects of 'use strict' is.

                        regards, tom lane

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


Reply via email to