Re: Re: [HACKERS] Overly strict casting rules? (was: proposal: fix corner use case of variadic fuctions usage) - Mailing list pgsql-general

From Chris Travers
Subject Re: Re: [HACKERS] Overly strict casting rules? (was: proposal: fix corner use case of variadic fuctions usage)
Date
Msg-id CAKt_Zft+aDOcty4hW8fODRTxA+mNmHgi0zLuLRKg4Pky0Ex8EQ@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] Overly strict casting rules? (was: proposal: fix corner use case of variadic fuctions usage)  (Craig Ringer <craig@2ndQuadrant.com>)
List pgsql-general


On Sun, Jan 20, 2013 at 7:15 PM, Craig Ringer <craig@2ndquadrant.com> 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

pgsql-general by date:

Previous
From: Craig Ringer
Date:
Subject: Re: [HACKERS] Overly strict casting rules? (was: proposal: fix corner use case of variadic fuctions usage)
Next
From: bhanu udaya
Date:
Subject: Re: pg_Restore