Michael Fuhr <mike@fuhr.org> writes:
> Are there any problems with doing this? Is a VALIDATOR function
> permitted to modify the function it's validating?
Well, it's not *supposed* to, but the tuple is already stored so I
guess an UPDATE on it will work. At the moment.
> This wouldn't work if plpythonu ever installs a VALIDATOR, but you
> might be able to use it until such time (barring objections about why
> it's a Bad Idea, that is).
The proposed hack seems far too simplistic to me ... what of CRs that
are deliberately included in string literals?
I don't know Python at all, so I don't know how complicated its lexical
structure is, but ISTM you'd at least need enough smarts to distinguish
literals from unquoted whitespace.
The other small fly in the ointment is that when the server is running
on Windows, I suppose we would have to *put in* rather than remove CRs.
Sim probably doesn't care about that case, but we couldn't accept an
official patch that doesn't handle it.
regards, tom lane