Re: plpython function problem workaround

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: plpython function problem workaround
Дата
Msg-id 13832.1110815662@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: plpython function problem workaround  (Michael Fuhr <mike@fuhr.org>)
Ответы Re: plpython function problem workaround  (Michael Fuhr <mike@fuhr.org>)
Список pgsql-general
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

В списке pgsql-general по дате отправления:

Предыдущее
От: "Rick Schumeyer"
Дата:
Сообщение: Re: prelimiary performance comparison pgsql vs mysql
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: prelimiary performance comparison pgsql vs mysql