Re: [PATCH] plpythonu datatype conversion improvements
| От | Tom Lane |
|---|---|
| Тема | Re: [PATCH] plpythonu datatype conversion improvements |
| Дата | |
| Msg-id | 503.1250520169@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: [PATCH] plpythonu datatype conversion improvements (Peter Eisentraut <peter_e@gmx.net>) |
| Ответы |
Re: [PATCH] plpythonu datatype conversion improvements
Re: [PATCH] plpythonu datatype conversion improvements |
| Список | pgsql-hackers |
Peter Eisentraut <peter_e@gmx.net> writes:
> The remaining problem is that the patch loses domain checking on the
> return types, because some paths no longer go through the data type's
> input function. I have marked these places as FIXME, and the regression
> tests also contain a failing test case for this.
For the record, I think this entire patch is a bad idea. PLs should not
be so much in bed with the internal representation of datatypes. To
take just one example, this *will* break when/if we change text to carry
some internal locale indicator. There has been absolutely zero evidence
presented to justify that there's a need to break abstraction to gain
performance in this area.
> What's needed here, I think, is an API that takes a datum plus type
> information and checks whether the datum is valid within the domain. I
> haven't found one that is exported, but maybe someone could give a tip.
There isn't one, but maybe you could expose domain_state_setup and
domain_check_input, or some simple wrapper around them.
regards, tom lane
В списке pgsql-hackers по дате отправления: