Re: JSON for PG 9.2

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: JSON for PG 9.2
Дата
Msg-id 19229.1323753749@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: JSON for PG 9.2  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: JSON for PG 9.2  (Simon Riggs <simon@2ndQuadrant.com>)
Список pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> On 12/12/2011 03:54 PM, Robert Haas wrote:
>> There are way too many places that assume that the typmod can
>> just be discarded.  I don't think that's going to fly, because
>> =(text,text) probably has different semantics from =(json,json).

> And certain places where they are not allowed at all, I think (unless I 
> am misremembering the early debates about enum types and output functions).

Yeah.  The current system design assumes that typmod specifies a
constraint of some sort.  It is not possible to use it to change the
semantics of the datatype.  The most obvious way in which this is true
is that selection of which operators and functions to apply to values
does not consider typmod of the values.  This is not something we should
lightly revisit.  We don't even have a handle on how to make domains
behave differently from their underlying datatypes, and those *do* have
their own type OIDs.  Injecting typmod into the algorithm seems like a
disaster from here.
        regards, tom lane


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

Предыдущее
От: Brendan Jurd
Дата:
Сообщение: Re: Arithmetic operators for macaddr type
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: JSON for PG 9.2