From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | David Johnston <polobo(at)yahoo(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: additional json functionality |
Date: | 2013-11-20 18:36:05 |
Message-ID: | 30087.1384972565@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
David Johnston <polobo(at)yahoo(dot)com> writes:
>> On 11/18/2013 06:13 AM, Peter Eisentraut wrote:
>>> We could do something like SQL/XML and specify the level of "validity"
>>> in a typmod, e.g., json(loose), json(strict), etc.
> Three things:
> 1) How would this work in the face of functions that erase typemod
> information?
You'd have to make the data self-identifying (which I think was the plan
already), and ensure that *every* function taking "json" could cope with
both formats on input. The typmod could only be expected to be enforced
when storing or explicitly casting to one subformat, much like operations
on "numeric" pay little attention to the original precision/scale if any.
I agree that this solution isn't terribly workable, mainly because it'd
break any third-party C functions that take json today.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Christopher Browne | 2013-11-20 18:36:46 | Re: Add CREATE support to event triggers |
Previous Message | David Johnston | 2013-11-20 18:34:12 | Re: WITH ORDINALITY versus column definition lists |