David Johnston <pol...@yahoo.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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers