Re: List of "binary-compatible" data types - Mailing list pgsql-hackers

From Noah Misch
Subject Re: List of "binary-compatible" data types
Date
Msg-id 20131105180828.GA746099@tornado.leadboat.com
Whole thread Raw
In response to Re: List of "binary-compatible" data types  (Josh Berkus <josh@agliodbs.com>)
List pgsql-hackers
On Tue, Nov 05, 2013 at 10:00:15AM -0800, Josh Berkus wrote:
> Noah,
> 
> >> Also, JSON <--> Text seems to be missing from the possible binary
> >> conversions.  That's a TODO, I suppose.
> > 
> > Only json --> text, not json <-- text.  Note that you can add the cast
> > manually if you have an immediate need.
> 
> Huh?  Why would text --> JSON require a physical rewrite?  We have to
> validate it, sure, but we don't need to rewrite it.

That's all true, but the system has no concept like "this cast validates the
data, never changing it".  We would first need to add metadata supporting such
a concept.  On the other hand, "create cast (json as text) without function;"
leans only on concepts the system already knows.

-- 
Noah Misch
EnterpriseDB                                 http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Re: List of "binary-compatible" data types
Next
From: Tom Lane
Date:
Subject: Better error message for window-function spec bizarreness