On Sun, Jan 20, 2013 at 7:15 PM, Craig Ringer <craig@xxxxxxxxxxxxxxx> wrote:
FWIW, I find PostgreSQL's type casting rules excessively strict and very
painful, especially when working via query generation layers and ORMs
with pseudo-text data types like "xml" and "json". I'd rather work with
direct SQL, but that's not always an option.
I want to second this specifically with regard to XML and JSON. I understand the concern about implicit casts to text, but what about bundling with a built-in domain that pseudo-text types can be implicitly cast to? Something like a generaltext type, where casts from other pseudo-text types are implicitly cast?
hmmm might be worth playing around with this in extension format.....
Best Wishes,
Chris Travers