Re: [HACKERS] nested hstore patch - FailedAssertion(!(value-array.nelems == 1)

2014-01-15 Thread Oleg Bartunov
https://github.com/feodor/postgres On Wed, Jan 15, 2014 at 11:10 AM, Erik Rijkers e...@xs4all.nl wrote: On Wed, January 15, 2014 08:01, Oleg Bartunov wrote: It doesn't crashed in the last version in our repository. =# select 'x'::hstore || ('a=1':: hstore) ; ?column? ---

Re: [HACKERS] nested hstore patch - FailedAssertion(!(value-array.nelems == 1)

2014-01-15 Thread Erik Rijkers
On Wed, January 15, 2014 09:46, Oleg Bartunov wrote: On Wed, January 15, 2014 08:01, Oleg Bartunov wrote: It doesn't crashed in the last version in our repository. =# select 'x'::hstore || ('a=1':: hstore) ; ?column? --- x, a, 1 (1 row) OK, shall I use that repository

Re: [HACKERS] nested hstore patch

2014-01-14 Thread Oleg Bartunov
Erik, thanks for docs fixes, we have even more :) Oleg On Tue, Jan 14, 2014 at 4:18 AM, Erik Rijkers e...@xs4all.nl wrote: On Mon, January 13, 2014 18:30, Andrew Dunstan wrote: On 01/13/2014 11:16 AM, Oleg Bartunov wrote: Andrew, did you run perl script ? Actually, I found, that operator

Re: [HACKERS] nested hstore patch - FailedAssertion(!(value-array.nelems == 1)

2014-01-14 Thread Erik Rijkers
On Mon, January 13, 2014 16:36, Andrew Dunstan wrote: A new version of the patch is attached. It includes all of Erik's docs [ nested_hstore_and_jsonb-2.patch ] This crashes the server: testdb=# select 'x' || ('a=1':: hstore) ; The connection to the server was lost. Attempting reset:

Re: [HACKERS] nested hstore patch - FailedAssertion(!(value-array.nelems == 1)

2014-01-14 Thread Oleg Bartunov
It doesn't crashed in the last version in our repository. =# select 'x'::hstore || ('a=1':: hstore) ; ?column? --- x, a, 1 (1 row) On Wed, Jan 15, 2014 at 3:53 AM, Erik Rijkers e...@xs4all.nl wrote: On Mon, January 13, 2014 16:36, Andrew Dunstan wrote: A new version of the

Re: [HACKERS] nested hstore patch - FailedAssertion(!(value-array.nelems == 1)

2014-01-14 Thread Erik Rijkers
On Wed, January 15, 2014 08:01, Oleg Bartunov wrote: It doesn't crashed in the last version in our repository. =# select 'x'::hstore || ('a=1':: hstore) ; ?column? --- x, a, 1 (1 row) OK, shall I use that repository instead of the latest posted patch? No point in testing

Re: [HACKERS] nested hstore patch

2014-01-13 Thread Oleg Bartunov
Thank you, Erik ! Oleg On Mon, Jan 13, 2014 at 12:25 PM, Erik Rijkers e...@xs4all.nl wrote: On Mon, January 13, 2014 00:24, Erik Rijkers wrote: On Sat, January 11, 2014 22:47, Andrew Dunstan wrote: On 01/11/2014 03:03 PM, Erik Rijkers wrote: On Sat, January 11, 2014 20:30, Peter Eisentraut

Re: [HACKERS] nested hstore patch

2014-01-13 Thread Alvaro Herrera
Andrew Dunstan wrote: On 01/13/2014 03:25 AM, Erik Rijkers wrote: There are errors in the example expressions in Table F-6. hstore Operators. Attached is a cumulative doc-patch (which includes the changes I sent earlier) which fixes these. I also attach an test perl program that

Re: [HACKERS] nested hstore patch

2014-01-13 Thread Oleg Bartunov
Andrew, did you run perl script ? Actually, I found, that operator table needs to be fixed. Oleg On Mon, Jan 13, 2014 at 7:36 PM, Andrew Dunstan and...@dunslane.net wrote: On 01/13/2014 03:25 AM, Erik Rijkers wrote: There are errors in the example expressions in Table F-6. hstore

Re: [HACKERS] nested hstore patch

2014-01-13 Thread Andrew Dunstan
On 01/13/2014 11:03 AM, Alvaro Herrera wrote: Andrew Dunstan wrote: On 01/13/2014 03:25 AM, Erik Rijkers wrote: There are errors in the example expressions in Table F-6. hstore Operators. Attached is a cumulative doc-patch (which includes the changes I sent earlier) which fixes these. I

Re: [HACKERS] nested hstore patch

2014-01-13 Thread Andrew Dunstan
On 01/13/2014 11:16 AM, Oleg Bartunov wrote: Andrew, did you run perl script ? Actually, I found, that operator table needs to be fixed. No. My build machine doesn't actually have DBD::Pg installed. Can you send me a patch if you don't want to push it yourself, or maybe Erik can send a

Re: [HACKERS] nested hstore patch

2014-01-13 Thread Erik Rijkers
On Mon, January 13, 2014 18:30, Andrew Dunstan wrote: On 01/13/2014 11:16 AM, Oleg Bartunov wrote: Andrew, did you run perl script ? Actually, I found, that operator table needs to be fixed. No. My build machine doesn't actually have DBD::Pg installed. Can you send me a patch if you

Re: [HACKERS] nested hstore patch

2014-01-12 Thread Erik Rijkers
On Sat, January 11, 2014 22:47, Andrew Dunstan wrote: On 01/11/2014 03:03 PM, Erik Rijkers wrote: On Sat, January 11, 2014 20:30, Peter Eisentraut wrote: The documentation doesn't build. corrective patch is here:

Re: [HACKERS] nested hstore patch

2014-01-11 Thread Peter Eisentraut
The documentation doesn't build. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] nested hstore patch

2014-01-11 Thread Erik Rijkers
On Sat, January 11, 2014 20:30, Peter Eisentraut wrote: The documentation doesn't build. corrective patch is here: http://www.postgresql.org/message-id/37b9f104d5a838eec9b75f3668517aa5.squir...@webmail.xs4all.nl -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To

Re: [HACKERS] nested hstore patch

2014-01-11 Thread Andrew Dunstan
On 01/11/2014 03:03 PM, Erik Rijkers wrote: On Sat, January 11, 2014 20:30, Peter Eisentraut wrote: The documentation doesn't build. corrective patch is here: http://www.postgresql.org/message-id/37b9f104d5a838eec9b75f3668517aa5.squir...@webmail.xs4all.nl It's been committed at

Re: [HACKERS] nested hstore patch

2014-01-11 Thread David E. Wheeler
On Jan 11, 2014, at 1:47 PM, Andrew Dunstan and...@dunslane.net wrote: It's been committed at https://github.com/feodor/postgres/commit/a21a4be55a5b12c4bd89b6ab2f77cf32e319de31. It will be in the next version of the patch posted. Bah! Sorry about that. Habit from decades of typing HTML.

Re: [HACKERS] nested hstore patch

2014-01-10 Thread Robert Haas
On Thu, Jan 9, 2014 at 5:08 PM, Andrew Dunstan and...@dunslane.net wrote: * I have replicated all the json processing functions for jsonb (although not the json generating functions, such as to_json). Most of these currently work by turning the jsonb back into json and then

Re: [HACKERS] nested hstore patch

2014-01-10 Thread Andrew Dunstan
On 01/10/2014 01:29 PM, Robert Haas wrote: On Thu, Jan 9, 2014 at 5:08 PM, Andrew Dunstan and...@dunslane.net wrote: * The jsonb regression test currently contains U+ABCD - I guess we'd better use some hex encoding or whatever for that - unlike json, the jsonb de-serializer dissolves

Re: [HACKERS] nested hstore patch

2014-01-09 Thread Andrew Dunstan
On 01/08/2014 04:29 PM, Oleg Bartunov wrote: Attached is a new version of patch, which addresses most issues raised by Andres. It's long holidays in Russia now and it happened that Teodor is traveling with family, so Teodor asked me to reply. Comments in code will be added asap. Oleg,

Re: [HACKERS] nested hstore patch

2014-01-09 Thread Josh Berkus
On 01/09/2014 06:12 AM, Andrew Dunstan wrote: Oleg, Please merge in the jsonb work and resubmit. See https://github.com/feodor/postgres/commits/jsonb_and_hstore I note that this repo does not apparently contain any of your latest changes. I'll go further and say that if the Hstore2 patch

Re: [HACKERS] nested hstore patch

2014-01-09 Thread Oleg Bartunov
I moved patch to the January commitfest (https://commitfest.postgresql.org/action/patch_view?id=1289) . Oleg PS. Kudos to Teodor and his mobile phone, which he used to synchronize branches on github. On Fri, Jan 10, 2014 at 2:08 AM, Andrew Dunstan and...@dunslane.net wrote: On 01/09/2014

Re: [HACKERS] nested hstore patch (sgml typo)

2014-01-08 Thread Erik Rijkers
On Wed, January 8, 2014 22:29, Oleg Bartunov wrote: Attached is a new version of patch, which addresses most issues raised by Andres. [ nested_hstore-0.42.patch.gz ] Building documentation fails: openjade:hstore.sgml:1010:18:E: end tag for element A which is not open

Re: [HACKERS] nested hstore patch

2014-01-08 Thread Jim Nasby
On 12/23/13, 9:47 AM, Pavel Stehule wrote: Has anybody looked into how hard it would be to add method notation to postgreSQL, so that instead of calling getString(hstorevalue, n) we could use hstorevalue.getString(n) yes, I played with it some years ago. I ended early,

Re: [HACKERS] nested hstore patch

2013-12-23 Thread Robert Haas
On Fri, Dec 20, 2013 at 6:16 PM, David E. Wheeler da...@justatheory.com wrote: * New operators: + `hstore - int`: Get string value at array index (starting at 0) + `hstore ^ text`:Get numeric value for key + `hstore ^ int`: Get numeric value at array index + `hstore ?

Re: [HACKERS] nested hstore patch

2013-12-23 Thread Hannu Krosing
On 12/23/2013 12:28 PM, Robert Haas wrote: On Fri, Dec 20, 2013 at 6:16 PM, David E. Wheeler da...@justatheory.com wrote: * New operators: + `hstore - int`: Get string value at array index (starting at 0) + `hstore ^ text`:Get numeric value for key + `hstore ^ int`: Get

Re: [HACKERS] nested hstore patch

2013-12-23 Thread Pavel Stehule
Hello 2013/12/23 Hannu Krosing ha...@2ndquadrant.com On 12/23/2013 12:28 PM, Robert Haas wrote: On Fri, Dec 20, 2013 at 6:16 PM, David E. Wheeler da...@justatheory.com wrote: * New operators: + `hstore - int`: Get string value at array index (starting at 0) + `hstore ^ text`:

Re: [HACKERS] nested hstore patch

2013-12-23 Thread Jonathan S. Katz
On Dec 23, 2013, at 6:28 AM, Robert Haas wrote: On Fri, Dec 20, 2013 at 6:16 PM, David E. Wheeler da...@justatheory.com wrote: * New operators: + `hstore - int`: Get string value at array index (starting at 0) + `hstore ^ text`:Get numeric value for key + `hstore ^ int`: Get

Re: [HACKERS] nested hstore patch

2013-12-20 Thread David E. Wheeler
On Nov 12, 2013, at 10:35 AM, Teodor Sigaev teo...@sigaev.ru wrote: Hi! Attatched patch adds nesting feature, types (string, boll and numeric values), arrays and scalar to hstore type. My apologies for not getting to this sooner, work has been a bit nutty. The truth is that I reviewed

Re: [HACKERS] nested hstore patch

2013-12-20 Thread Andres Freund
On 2013-12-20 15:16:30 -0800, David E. Wheeler wrote: But for the hstore feature itself, I think the current interface and features are ready to go. I think this patch needs significant amount of work because it can be considered ready for committer. I found the list of issues in

Re: [HACKERS] nested hstore patch

2013-11-20 Thread Peter Eisentraut
On 11/12/13, 1:35 PM, Teodor Sigaev wrote: Hi! Attatched patch adds nesting feature, types (string, boll and numeric values), arrays and scalar to hstore type. Documentation doesn't build: openjade:hstore.sgml:206:16:E: document type does not allow element VARLISTENTRY here; assuming

Re: [HACKERS] nested hstore patch

2013-11-20 Thread David E. Wheeler
On Nov 20, 2013, at 6:19 AM, Peter Eisentraut pete...@gmx.net wrote: openjade:hstore.sgml:206:16:E: document type does not allow element VARLISTENTRY here; assuming missing VARIABLELIST start-tag Thanks, I fixed this one. David -- Sent via pgsql-hackers mailing list

Re: [HACKERS] nested hstore patch

2013-11-19 Thread Bruce Momjian
On Thu, Nov 14, 2013 at 05:50:02PM +0100, Hannu Krosing wrote: If we could somehow turn old json into a text domain with json syntax check (which it really is up to 9.3) via pg_upgrade that would be great. It would be the required for pg_dump to have some swicth to output different typename

Re: [HACKERS] nested hstore patch

2013-11-19 Thread Robert Haas
On Wed, Nov 13, 2013 at 6:59 PM, Hannu Krosing ha...@2ndquadrant.com wrote: I remember strong voices in support of *not* normalising json, so that things like {a:1,a:true, a:b, a:none} would go through the system unaltered, for claimed standard usage of json as processing instructions.

Re: [HACKERS] nested hstore patch

2013-11-19 Thread Bruce Momjian
On Tue, Nov 19, 2013 at 10:51:06AM -0500, Robert Haas wrote: I think this was the consensus solution when this was last discussed, and I support it. There is similar space for a binary XML data type if someone feels like implementing it. I think the names that were proposed previously were

Re: [HACKERS] nested hstore patch

2013-11-19 Thread Andrew Dunstan
On 11/19/2013 10:51 AM, Robert Haas wrote: I suggest we add another type, maybe jsobj, which has input and output as standard JSON but which is defined from the start to be equivalent of existing object and not preservable source code to such object. I think this was the consensus solution

Re: [HACKERS] nested hstore patch

2013-11-19 Thread Robert Haas
On Tue, Nov 19, 2013 at 10:55 AM, Bruce Momjian br...@momjian.us wrote: On Tue, Nov 19, 2013 at 10:51:06AM -0500, Robert Haas wrote: I think this was the consensus solution when this was last discussed, and I support it. There is similar space for a binary XML data type if someone feels like

Re: [HACKERS] nested hstore patch

2013-11-19 Thread Andrew Dunstan
On 11/19/2013 11:00 AM, Robert Haas wrote: On Tue, Nov 19, 2013 at 10:55 AM, Bruce Momjian br...@momjian.us wrote: On Tue, Nov 19, 2013 at 10:51:06AM -0500, Robert Haas wrote: I think this was the consensus solution when this was last discussed, and I support it. There is similar space for a

Re: [HACKERS] nested hstore patch

2013-11-18 Thread Andres Freund
Hi, On 2013-11-12 22:35:31 +0400, Teodor Sigaev wrote: Attatched patch adds nesting feature, types (string, boll and numeric values), arrays and scalar to hstore type. I took a quick peek at this: * You cannot simply catch and ignore errors by doing + PG_TRY(); + { +

Re: [HACKERS] nested hstore patch

2013-11-14 Thread Hannu Krosing
On 11/14/2013 01:32 AM, David E. Wheeler wrote: On Nov 13, 2013, at 3:59 PM, Hannu Krosing ha...@2ndquadrant.com wrote: I remember strong voices in support of *not* normalising json, so that things like {a:1,a:true, a:b, a:none} would go through the system unaltered, for claimed standard

Re: [HACKERS] nested hstore patch

2013-11-14 Thread Andrew Dunstan
On 11/14/2013 03:21 AM, Hannu Krosing wrote: On 11/14/2013 01:32 AM, David E. Wheeler wrote: On Nov 13, 2013, at 3:59 PM, Hannu Krosing ha...@2ndquadrant.com wrote: I remember strong voices in support of *not* normalising json, so that things like {a:1,a:true, a:b, a:none} would go through

Re: [HACKERS] nested hstore patch

2013-11-14 Thread Hannu Krosing
On 11/14/2013 01:47 PM, Andrew Dunstan wrote: On 11/14/2013 03:21 AM, Hannu Krosing wrote: On 11/14/2013 01:32 AM, David E. Wheeler wrote: On Nov 13, 2013, at 3:59 PM, Hannu Krosing ha...@2ndquadrant.com wrote: I remember strong voices in support of *not* normalising json, so that things

Re: [HACKERS] nested hstore patch

2013-11-13 Thread Peter Eisentraut
On 11/12/13, 1:35 PM, Teodor Sigaev wrote: Attatched patch adds nesting feature, types (string, boll and numeric values), arrays and scalar to hstore type. Could you check your email client for next time? It's sending Content-Type: application/x-tar for a *.patch.gz file. -- Sent via

Re: [HACKERS] nested hstore patch

2013-11-13 Thread Hannu Krosing
On 11/13/2013 01:37 AM, Andrew Dunstan wrote: On 11/12/2013 01:35 PM, Teodor Sigaev wrote: Hi! Attatched patch adds nesting feature, types (string, boll and numeric values), arrays and scalar to hstore type. All new features are described in PGConf.EU talk

Re: [HACKERS] nested hstore patch

2013-11-13 Thread David E. Wheeler
On Nov 13, 2013, at 3:59 PM, Hannu Krosing ha...@2ndquadrant.com wrote: I remember strong voices in support of *not* normalising json, so that things like {a:1,a:true, a:b, a:none} would go through the system unaltered, for claimed standard usage of json as processing instructions. That

Re: [HACKERS] nested hstore patch

2013-11-12 Thread Andrew Dunstan
On 11/12/2013 01:35 PM, Teodor Sigaev wrote: Hi! Attatched patch adds nesting feature, types (string, boll and numeric values), arrays and scalar to hstore type. All new features are described in PGConf.EU talk http://www.sai.msu.su/~megera/postgres/talks/hstore-dublin-2013.pdf (since