From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: WIP json generation enhancements |
Date: | 2012-11-26 15:55:16 |
Message-ID: | CA+TgmoamG=axyyL0ysLV14Wsp3F1Poe7nq7_AYQwXEDDoZiYUw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Nov 21, 2012 at 3:16 PM, Andrew Dunstan <andrew(at)dunslane(dot)net> wrote:
> Non-builtin types are now searched for a cast to json, and if it exists it
> is used instead of the type's text representation. I didn't add a special
> type to look for a cast to, as was discussed before, as it seemed a bit
> funky and unnecessary. It can easily be added, but I'm still not convinced
> it's a good idea. Note that this is only done for types that aren't builtin
> - we know how to turn all of those into json without needing to look for a
> cast.
The place where I fear this will cause problems is with non-core
text-like datatypes, such as citext. For example, I wonder if
creating a cast from citext to json - which seems like a sensible
thing to want to do for other reasons - changes the semantics of this
function when applied to citext objects.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2012-11-26 15:55:47 | Re: change in LOCK behavior |
Previous Message | Tom Lane | 2012-11-26 15:47:38 | Upcoming back-branch releases |