Re: PATCH: Add hstore_to_json()

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: "David E(dot) Wheeler" <david(at)kineticode(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PATCH: Add hstore_to_json()
Date: 2010-01-01 22:19:24
Message-ID: 4B3E74EC.3030406@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut wrote:
>> IMNSHO it's essential. I think Peter's approach of ignoring this
>> requirement is extremely shortsighted.
>>
>
> Whose requirement is it? I'm not ignoring it, but so far no one has
> actually said that it is a requirement and why.
>
>

Mine for one :-). Quite apart from any other reason I would expect it to
make indexing parts of the JSON more tractable. Say we use it to store a
web session object, which is a natural enough use. I might well want to
find or modify sessions with certain characteristics. I'm sure I
wouldn't be the only possible usewr who would want something
substantially more of such a type than just being able to validate it.
We have XPath for XML. and a substantial accessor API for hstore, so why
would we want anything less for JSON?

In general we have adopted an approach that allows for a very rich type
system, with a substantial set of manipulator functions for almost all
types. That's one of the things I find attractive about Postgres, so I
think we should stick to it in this instance.

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-01-01 22:50:18 Re: PATCH: Add hstore_to_json()
Previous Message Simon Riggs 2010-01-01 21:45:43 Re: Cancelling idle in transaction state