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 17:31:40 |
Message-ID: | CA+TgmoZXBZ13ScQyoBHym6q4Nx-zMQCDsM=SyiQ9DxxuzSoyrw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Nov 26, 2012 at 11:43 AM, Andrew Dunstan <andrew(at)dunslane(dot)net> wrote:
> I don't understand why you would want to create such a cast. If the cast
> doesn't exist it will do exactly what it does now, i.e. use the type's
> output function and then json quote and escape it, which in the case of
> citext is the Right Thing (tm):
>
> andrew=# select to_json('foo"bar'::citext);
> to_json
> ------------
> "foo\"bar"
I'm not sure either, but setting up a system where seemingly innocuous
actions can in fact have surprising and not-easily-fixable
consequences in other parts of the system doesn't seem like good
design to me. Of course, maybe I'm misunderstanding what will happen;
I haven't actually tested it myself.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Merlin Moncure | 2012-11-26 18:05:18 | Re: WIP json generation enhancements |
Previous Message | Thangalin | 2012-11-26 17:26:34 | Transform mapped XPath expressions into XML containing relational data |