| From: | Teodor Sigaev <teodor(at)sigaev(dot)ru> | 
|---|---|
| To: | Josh Berkus <josh(at)agliodbs(dot)com>, Peter Geoghegan <pg(at)heroku(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us> | 
| Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Merlin Moncure <mmoncure(at)gmail(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Christophe Pettus <xof(at)thebuild(dot)com>, PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org> | 
| Subject: | Re: jsonb and nested hstore | 
| Date: | 2014-03-06 08:23:31 | 
| Message-ID: | 53183083.4020404@sigaev.ru | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
>
> Thank you for checking that.  Teodor's goal was that new-hstore be 100%
> backwards-compatible with old-hstore.  If we're breaking APIs, then it
That's true. Binary format is fully compatible unless old hstore value has more 
than 2^28 key-value pairs (256 mln which is far from reachable by memory 
requirements). The single issue is a GiST index, GIN index should be recreated 
to utilize new features.
> doesn't really work to force users to upgrade the type, no?
>
> Teodor, are these output changes things that can be made consistent, or
> do we need separate hstore and hstore2 datatypes?
Introducing types in hstore causes this incompatibility - but I don't think 
that's huge or even  big problem. In most cases application does quoting (sets 
"1" instead of just 1) to preserve SQL-injection and to protect hstore-forbidden 
characters in hstore. Keys leaves untouched - it could be only a string.
That's possible to introduce GUC variable for i/o functions which will control 
old "bug-to-bug" behavior. IMHO, this is much better option that stopping hstore 
development or split hstore to two branches.
-- 
Teodor Sigaev                                   E-mail: teodor(at)sigaev(dot)ru
                                                    WWW: http://www.sigaev.ru/
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Peter Geoghegan | 2014-03-06 08:43:44 | Re: jsonb and nested hstore | 
| Previous Message | Yeb Havinga | 2014-03-06 08:16:43 | Re: Row-security on updatable s.b. views |