Re: [PATCH] few fts functions for jsonb - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: [PATCH] few fts functions for jsonb
Date
Msg-id b35782fb-5088-068e-9be0-f327e166052e@2ndQuadrant.com
Whole thread Raw
In response to [HACKERS] [PATCH] few fts functions for jsonb  (Dmitry Dolgov <9erthalion6@gmail.com>)
List pgsql-hackers

On 04/03/2017 03:41 PM, Sven R. Kunze wrote:
> On 03.04.2017 21:30, Andrew Dunstan wrote:
>> On 04/03/2017 02:44 PM, Sven R. Kunze wrote:
>>> On 01.04.2017 22:20, Andrew Dunstan wrote:
>>>> I added documentation when I committed it for the new functions, in
>>>> the
>>>> FTS section. I'm not sure what we need to add to the JSON section if
>>>> anything.
>>> Not sure, if this is related but the formatting of
>>> https://www.postgresql.org/docs/devel/static/functions-textsearch.html
>>> looks a bit strange.
>>>
>>> Just 2 questions/notes:
>>> 1) in what order are the values of the JSON extracted?
>> In the order they exist in the underlying document.
>
> Just asking as the order can have implications for fulltext searches.
> So, might be valuable for the docs.
>
>
> Are these documents equally ordered in this sense?
>
> srkunze=# select '{"a": "abc", "b": "def"}'::jsonb;
>           jsonb
> --------------------------
>  {"a": "abc", "b": "def"}
> (1 row)
>
> srkunze=# select '{"b": "def", "a": "abc"}'::jsonb;
>           jsonb
> --------------------------
>  {"a": "abc", "b": "def"}
> (1 row)
>


Yes, when converted to jsonb these two documents are identical.


>
> Also what about non-ascii keys? Are they ordered by the default locale
> of the PostgreSQL cluster (say de_DE.utf-8)?


Yes, I believe so.

cheers

andrew

-- 
Andrew Dunstan                https://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services




pgsql-hackers by date:

Previous
From: "Sven R. Kunze"
Date:
Subject: Re: [PATCH] few fts functions for jsonb
Next
From: Andres Freund
Date:
Subject: Re: Parallel Append implementation