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

From: Chris Travers <chris(dot)travers(at)gmail(dot)com>
To: Craig Ringer <craig(at)2ndquadrant(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Re: [HACKERS] Overly strict casting rules? (was: proposal: fix corner use case of variadic fuctions usage)
Date: 2013-01-21 03:55:01
Message-ID: CAKt_Zft+aDOcty4hW8fODRTxA+mNmHgi0zLuLRKg4Pky0Ex8EQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On Sun, Jan 20, 2013 at 7:15 PM, Craig Ringer <craig(at)2ndquadrant(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message bhanu udaya 2013-01-21 04:10:08 Re: pg_Restore
Previous Message Robert Haas 2013-01-21 03:23:19 Re: proposal: fix corner use case of variadic fuctions usage

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2013-01-21 04:11:44 Re: [PATCH] Fix off-by-one in PQprintTuples()
Previous Message Craig Ringer 2013-01-21 03:36:33 Re: [WIP] pg_ping utility