public inbox for [email protected]  
help / color / mirror / Atom feed
JSON doc problem
3+ messages / 2 participants
[nested] [flat]

* JSON doc problem
@ 2014-06-21 04:18  Bruce Momjian <[email protected]>
  0 siblings, 1 reply; 3+ messages in thread

From: Bruce Momjian @ 2014-06-21 04:18 UTC (permalink / raw)
  To: pgsql-docs

There seems to be a problem in this 9.4 JSON doc paragraph in json.sgml:

    The technical difference between a <literal>jsonb_ops</literal>
    and a <literal>jsonb_path_ops</literal> GIN index is that the former
    creates independent index items for each key and value in the data,
    while the latter creates index items only for each value in the
    data.<footnote><para>For this purpose, the term <quote>value</>
    includes array elements, though JSON terminology sometimes considers
    array elements distinct from values within objects.</para></footnote>
--> But in <literal>jsonb_path_ops</literal>, each index item is a hash
    of both the value and the key(s) leading to it; for example to index
    <literal>{"foo": {"bar": "baz"}}</literal>, a single index item would
    be created incorporating all three of <literal>foo</>, <literal>bar</>,

What does this "But" refer to, and it is consistent with the sentences above?

-- 
  Bruce Momjian  <[email protected]>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + Everyone has their own god. +


-- 
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: JSON doc problem
@ 2014-06-21 15:32  Tom Lane <[email protected]>
  parent: Bruce Momjian <[email protected]>
  0 siblings, 1 reply; 3+ messages in thread

From: Tom Lane @ 2014-06-21 15:32 UTC (permalink / raw)
  To: Bruce Momjian <[email protected]>; +Cc: pgsql-docs

Bruce Momjian <[email protected]> writes:
> What does this "But" refer to, and it is consistent with the sentences above?

Hmm.  Probably "Also" or "Moreover" would work there.  I think this might
be leftover from a previous version of the paragraph --- I recall having
rewritten that several times before I was satisfied with it.

			regards, tom lane


-- 
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: JSON doc problem
@ 2014-06-21 19:32  Bruce Momjian <[email protected]>
  parent: Tom Lane <[email protected]>
  0 siblings, 0 replies; 3+ messages in thread

From: Bruce Momjian @ 2014-06-21 19:32 UTC (permalink / raw)
  To: Tom Lane <[email protected]>; +Cc: pgsql-docs

On Sat, Jun 21, 2014 at 11:32:40AM -0400, Tom Lane wrote:
> Bruce Momjian <[email protected]> writes:
> > What does this "But" refer to, and it is consistent with the sentences above?
> 
> Hmm.  Probably "Also" or "Moreover" would work there.  I think this might
> be leftover from a previous version of the paragraph --- I recall having
> rewritten that several times before I was satisfied with it.

Thanks.  I have adjusted it with the attached, applied patch.

-- 
  Bruce Momjian  <[email protected]>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + Everyone has their own god. +


-- 
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs


Attachments:

  [text/x-diff] json.diff (1.9K, 2-json.diff)
  download | inline diff:
diff --git a/doc/src/sgml/json.sgml b/doc/src/sgml/json.sgml
new file mode 100644
index 6642618..d55a08f
*** a/doc/src/sgml/json.sgml
--- b/doc/src/sgml/json.sgml
*************** SELECT jdoc-&gt;'guid', jdoc-&gt;'name'
*** 460,470 ****
      and a <literal>jsonb_path_ops</literal> GIN index is that the former
      creates independent index items for each key and value in the data,
      while the latter creates index items only for each value in the
!     data.<footnote><para>For this purpose, the term <quote>value</>
!     includes array elements, though JSON terminology sometimes considers
!     array elements distinct from values within objects.</para></footnote>
!     But in <literal>jsonb_path_ops</literal>, each index item is a hash
!     of both the value and the key(s) leading to it; for example to index
      <literal>{"foo": {"bar": "baz"}}</literal>, a single index item would
      be created incorporating all three of <literal>foo</>, <literal>bar</>,
      and <literal>baz</> into the hash value.  Thus a containment query
--- 460,475 ----
      and a <literal>jsonb_path_ops</literal> GIN index is that the former
      creates independent index items for each key and value in the data,
      while the latter creates index items only for each value in the
!     data.  
!     <footnote>
!      <para>
!       For this purpose, the term <quote>value</> includes array elements,
!       though JSON terminology sometimes considers array elements distinct
!       from values within objects.
!      </para>
!     </footnote>
!     Basically, each <literal>jsonb_path_ops</literal> index item is
!     a hash of the value and the key(s) leading to it; for example to index
      <literal>{"foo": {"bar": "baz"}}</literal>, a single index item would
      be created incorporating all three of <literal>foo</>, <literal>bar</>,
      and <literal>baz</> into the hash value.  Thus a containment query


^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2014-06-21 19:32 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2014-06-21 04:18 JSON doc problem Bruce Momjian <[email protected]>
2014-06-21 15:32 ` Tom Lane <[email protected]>
2014-06-21 19:32   ` Bruce Momjian <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox