Re: WIP json generation enhancements
| От | Robert Haas |
|---|---|
| Тема | Re: WIP json generation enhancements |
| Дата | |
| Msg-id | CA+TgmoZXBZ13ScQyoBHym6q4Nx-zMQCDsM=SyiQ9DxxuzSoyrw@mail.gmail.com обсуждение исходный текст |
| Ответ на | Re: WIP json generation enhancements (Andrew Dunstan <andrew@dunslane.net>) |
| Ответы |
Re: WIP json generation enhancements
|
| Список | pgsql-hackers |
On Mon, Nov 26, 2012 at 11:43 AM, Andrew Dunstan <andrew@dunslane.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
В списке pgsql-hackers по дате отправления: