Re: [HACKERS] jsonb and nested hstore

2014-01-30 Thread Andrew Dunstan
On 01/30/2014 01:03 PM, Hannu Krosing wrote: On 01/30/2014 06:45 PM, Andrew Dunstan wrote: On 01/30/2014 12:34 PM, Merlin Moncure wrote: On Thu, Jan 30, 2014 at 9:50 AM, Andrew Dunstan and...@dunslane.net wrote: Now, if we're agreed on that, I then also wonder if the 'as_text' argument needs

Re: [HACKERS] jsonb and nested hstore

2014-01-30 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes: On 01/30/2014 01:03 PM, Hannu Krosing wrote: On 01/30/2014 06:45 PM, Andrew Dunstan wrote: We'd have to move that code from hstore to jsonb_support.c and then make hstore refer to it. Or just copy it and leave hstore alone - the code duplication is

Re: [HACKERS] jsonb and nested hstore

2014-01-30 Thread Andrew Dunstan
On 01/30/2014 01:50 PM, Tom Lane wrote: Andrew Dunstan and...@dunslane.net writes: On 01/30/2014 01:03 PM, Hannu Krosing wrote: On 01/30/2014 06:45 PM, Andrew Dunstan wrote: We'd have to move that code from hstore to jsonb_support.c and then make hstore refer to it. Or just copy it and

Re: [HACKERS] jsonb and nested hstore - small docpatch

2014-01-30 Thread Erik Rijkers
On Thu, January 30, 2014 20:07, Andrew Dunstan wrote: Updated patches for both pieces. Included is some tidying done by [ nested-hstore-9.patch.gz ] Here is a small doc-patch to Table F-6. hstore Operators It corrects its booleans in the 'Result' column ( t and f instead of true and

Re: [HACKERS] jsonb and nested hstore - small docpatch

2014-01-30 Thread Erik Rijkers
On Thu, January 30, 2014 23:15, Erik Rijkers wrote: On Thu, January 30, 2014 20:07, Andrew Dunstan wrote: Updated patches for both pieces. Included is some tidying done by [ nested-hstore-9.patch.gz ] Here is a small doc-patch to Table F-6. hstore Operators It corrects its booleans in

Re: [HACKERS] jsonb and nested hstore

2014-01-30 Thread Merlin Moncure
On Thu, Jan 30, 2014 at 1:07 PM, Andrew Dunstan and...@dunslane.net wrote: On 01/29/2014 04:56 PM, Andrew Dunstan wrote: On 01/29/2014 01:03 PM, Andrew Dunstan wrote: On 01/27/2014 10:43 PM, Andrew Dunstan wrote: On 01/26/2014 05:42 PM, Andrew Dunstan wrote: Here is the latest set of

Re: [HACKERS] jsonb and nested hstore

2014-01-30 Thread Andrew Dunstan
On 01/30/2014 07:21 PM, Merlin Moncure wrote: Something seems off: postgres=# create type z as (a int, b int[]); CREATE TYPE postgres=# create type y as (a int, b z[]); CREATE TYPE postgres=# create type x as (a int, b y[]); CREATE TYPE -- test a complicated construction postgres=# select

Re: [HACKERS] jsonb and nested hstore

2014-01-30 Thread Merlin Moncure
On Thu, Jan 30, 2014 at 4:52 PM, Andrew Dunstan and...@dunslane.net wrote: On 01/30/2014 07:21 PM, Merlin Moncure wrote: postgres=# select hstore(row(1, array[row(1, array[row(1, array[1,2])::z])::y])::x); hstore

Re: [HACKERS] jsonb and nested hstore

2014-01-29 Thread Merlin Moncure
On Wed, Jan 29, 2014 at 12:03 PM, Andrew Dunstan and...@dunslane.net wrote: Only change in functionality is the addition of casts between jsonb and json. The other changes are the merge with the new json functions code, and rearrangement of the docs changes to make them less ugly. Essentially

Re: [HACKERS] jsonb and nested hstore

2014-01-29 Thread Josh Berkus
On 01/29/2014 12:46 PM, Merlin Moncure wrote: I think the opening paragraphs contrasting json/jsonb be needs refinement. json is going to be slightly faster than jsonb for input *and* output. For example, in one application I store fairly large json objects containing pre-compiled static

Re: [HACKERS] jsonb and nested hstore

2014-01-29 Thread Merlin Moncure
On Wed, Jan 29, 2014 at 3:56 PM, Andrew Dunstan and...@dunslane.net wrote: On 01/29/2014 01:03 PM, Andrew Dunstan wrote: On 01/27/2014 10:43 PM, Andrew Dunstan wrote: On 01/26/2014 05:42 PM, Andrew Dunstan wrote: Here is the latest set of patches for nested hstore and jsonb. Because

Re: [HACKERS] jsonb and nested hstore

2014-01-29 Thread Andrew Dunstan
On 01/29/2014 05:37 PM, Merlin Moncure wrote: On Wed, Jan 29, 2014 at 3:56 PM, Andrew Dunstan and...@dunslane.net wrote: On 01/29/2014 01:03 PM, Andrew Dunstan wrote: On 01/27/2014 10:43 PM, Andrew Dunstan wrote: On 01/26/2014 05:42 PM, Andrew Dunstan wrote: Here is the latest set of

Re: [HACKERS] jsonb and nested hstore

2014-01-29 Thread Josh Berkus
On 01/29/2014 02:37 PM, Merlin Moncure wrote: create table bar(a int, b int[]); postgres=# select jsonb_populate_record(null::bar, '{a: 1, b: [1,2]}'::jsonb, false); ERROR: cannot populate with a nested object unless use_json_as_text is true Hmmm. What about just making any impossibly

Re: [HACKERS] jsonb and nested hstore

2014-01-28 Thread Merlin Moncure
On Mon, Jan 27, 2014 at 9:43 PM, Andrew Dunstan and...@dunslane.net wrote: On 01/26/2014 05:42 PM, Andrew Dunstan wrote: Here is the latest set of patches for nested hstore and jsonb. Because it's so large I've broken this into two patches and compressed them. The jsonb patch should work

Re: [HACKERS] jsonb and nested hstore

2014-01-28 Thread Andrew Dunstan
On 01/28/2014 09:38 AM, Merlin Moncure wrote: On Mon, Jan 27, 2014 at 9:43 PM, Andrew Dunstan and...@dunslane.net wrote: On 01/26/2014 05:42 PM, Andrew Dunstan wrote: Here is the latest set of patches for nested hstore and jsonb. Because it's so large I've broken this into two patches and

Re: [HACKERS] jsonb and nested hstore

2014-01-28 Thread Merlin Moncure
Looks like this review is against jsonb-5, not jsonb-6. oh yep -- shoot, sorry for the noise. merlin -- 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] jsonb and nested hstore

2014-01-28 Thread Alvaro Herrera
Andrew Dunstan wrote: para +There are two JSON data types: typejson/type and typejsonb/type. +Both accept identical sets of values as input. The difference is primarily +a matter of efficiency. The typejson/type data type stores an exact +copy of the the input text, and

Re: [HACKERS] jsonb and nested hstore

2014-01-28 Thread Andrew Dunstan
On 01/28/2014 10:50 AM, Alvaro Herrera wrote: + /indextermindexterm + primaryjsonb_each/primary + /indextermparaliteraljson_each(json)/literal + /paraparaliteraljsonb_each(jsonb)/literal + /para/entry This SGML nesting is odd and hard to read. Please

Re: [HACKERS] jsonb and nested hstore

2014-01-28 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes: On 01/28/2014 10:50 AM, Alvaro Herrera wrote: + /indextermindexterm + primaryjsonb_each/primary + /indextermparaliteraljson_each(json)/literal + /paraparaliteraljsonb_each(jsonb)/literal + /para/entry This

Re: [HACKERS] jsonb and nested hstore

2014-01-28 Thread Andrew Dunstan
On 01/28/2014 11:09 AM, Tom Lane wrote: Andrew Dunstan and...@dunslane.net writes: On 01/28/2014 10:50 AM, Alvaro Herrera wrote: + /indextermindexterm + primaryjsonb_each/primary + /indextermparaliteraljson_each(json)/literal +

Re: [HACKERS] jsonb and nested hstore

2014-01-28 Thread Alvaro Herrera
Tom Lane wrote: Andrew Dunstan and...@dunslane.net writes: On 01/28/2014 10:50 AM, Alvaro Herrera wrote: + /indextermindexterm + primaryjsonb_each/primary + /indextermparaliteraljson_each(json)/literal + /paraparaliteraljsonb_each(jsonb)/literal +

Re: [HACKERS] jsonb and nested hstore

2014-01-28 Thread Tom Lane
Alvaro Herrera alvhe...@2ndquadrant.com writes: Tom Lane wrote: Practically every existing use of indexterm is freer than this in its use of whitespace. It sounds to me like maybe you are trying to put the indexterm inside something it shouldn't go inside of. FWIW I was just talking about

Re: [HACKERS] jsonb and nested hstore

2014-01-28 Thread Andrew Dunstan
On 01/28/2014 11:27 AM, Tom Lane wrote: Alvaro Herrera alvhe...@2ndquadrant.com writes: Tom Lane wrote: Practically every existing use of indexterm is freer than this in its use of whitespace. It sounds to me like maybe you are trying to put the indexterm inside something it shouldn't go

Re: [HACKERS] jsonb and nested hstore

2014-01-28 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes: The problem is not the indexterm element, it's the space that might exist outside it. Are we using block level elements like para inside entry elements anywhere else? Probably not, and I wonder why you're trying to. Whole paras inside a table entry

Re: [HACKERS] jsonb and nested hstore

2014-01-28 Thread Andrew Dunstan
On 01/28/2014 11:29 AM, Tom Lane wrote: Andrew Dunstan and...@dunslane.net writes: The problem is not the indexterm element, it's the space that might exist outside it. Are we using block level elements like para inside entry elements anywhere else? Probably not, and I wonder why you're

Re: [HACKERS] jsonb and nested hstore

2014-01-28 Thread Merlin Moncure
On Tue, Jan 28, 2014 at 10:46 AM, Andrew Dunstan and...@dunslane.net wrote: On 01/28/2014 11:29 AM, Tom Lane wrote: Andrew Dunstan and...@dunslane.net writes: The problem is not the indexterm element, it's the space that might exist outside it. Are we using block level elements like para

Re: [HACKERS] jsonb and nested hstore

2014-01-28 Thread Josh Berkus
On 01/28/2014 09:58 AM, Merlin Moncure wrote: yeah. note: I think the json documentation needs *major* overhaul. too much is going in inside the function listings where there really should be a big breakout discussing the big picture of json/jsonb with examples of various use cases. I want to

Re: [HACKERS] jsonb and nested hstore

2014-01-28 Thread Merlin Moncure
On Tue, Jan 28, 2014 at 12:09 PM, Josh Berkus j...@agliodbs.com wrote: On 01/28/2014 09:58 AM, Merlin Moncure wrote: yeah. note: I think the json documentation needs *major* overhaul. too much is going in inside the function listings where there really should be a big breakout discussing the

Re: [HACKERS] jsonb and nested hstore

2014-01-28 Thread Josh Berkus
On 01/28/2014 10:29 AM, Merlin Moncure wrote: In addition to this, the JSON vs JSONB datatype page really needs expansion and clarification. right: exactly. I'd be happy to help (such as I can) ...I wanted to see if jsonb to make it in on this 'fest (doc issues notwithstanding); it hasn't

Re: [HACKERS] jsonb and nested hstore

2014-01-28 Thread Alvaro Herrera
Josh Berkus escribió: Or is this just about whitespace and line breaks? If the docs are going to be rehauled, please ignore my whitespace comments. -- Álvaro Herrerahttp://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training Services -- Sent via

Re: [HACKERS] jsonb and nested hstore

2014-01-28 Thread Josh Berkus
On 01/28/2014 10:56 AM, Alvaro Herrera wrote: Josh Berkus escribió: Or is this just about whitespace and line breaks? If the docs are going to be rehauled, please ignore my whitespace comments. I'm sure you'll find plenty to criticize in my version. ;-) -- Josh Berkus PostgreSQL

<    1   2   3   4   5