~ubuntu-branches/ubuntu/vivid/postgresql-9.4/vivid-proposed

« back to all changes in this revision

Viewing changes to doc/src/sgml/html/datatype-json.html

  • Committer: Package Import Robot
  • Author(s): Christoph Berg
  • Date: 2014-11-18 09:49:04 UTC
  • mfrom: (4.1.4 sid)
  • Revision ID: package-import@ubuntu.com-20141118094904-f7f1jhitn5iadkgn
Tags: 9.4~rc1-1
* First 9.4 RC release.
* Update psql call in dump-reload instructions.
* Reenable 010_pg_basebackup.t tests, fixed upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
REV="MADE"
10
10
HREF="mailto:pgsql-docs@postgresql.org"><LINK
11
11
REL="HOME"
12
 
TITLE="PostgreSQL 9.4beta3 Documentation"
 
12
TITLE="PostgreSQL 9.4rc1 Documentation"
13
13
HREF="index.html"><LINK
14
14
REL="UP"
15
15
TITLE="Data Types"
26
26
HTTP-EQUIV="Content-Type"
27
27
CONTENT="text/html; charset=ISO-8859-1"><META
28
28
NAME="creation"
29
 
CONTENT="2014-10-06T18:35:22"></HEAD
 
29
CONTENT="2014-11-17T20:57:46"></HEAD
30
30
><BODY
31
31
CLASS="SECT1"
32
32
><DIV
44
44
VALIGN="bottom"
45
45
><A
46
46
HREF="index.html"
47
 
>PostgreSQL 9.4beta3 Documentation</A
 
47
>PostgreSQL 9.4rc1 Documentation</A
48
48
></TH
49
49
></TR
50
50
><TR
597
597
-- The array on the right side is contained within the one on the left:
598
598
SELECT '[1, 2, 3]'::jsonb @&#62; '[1, 3]'::jsonb;
599
599
 
 
600
-- Order of array elements is not significant, so this is also true:
 
601
SELECT '[1, 2, 3]'::jsonb @&#62; '[3, 1]'::jsonb;
 
602
 
 
603
-- Duplicate array elements don't matter either:
 
604
SELECT '[1, 2, 3]'::jsonb @&#62; '[1, 2, 2]'::jsonb;
 
605
 
600
606
-- The object with a single pair on the right side is contained
601
607
-- within the object on the left side:
602
608
SELECT '{"product": "PostgreSQL", "version": 9.4, "jsonb":true}'::jsonb @&#62; '{"version":9.4}'::jsonb;
617
623
>   The general principle is that the contained object must match the
618
624
   containing object as to structure and data contents, possibly after
619
625
   discarding some non-matching array elements or object key/value pairs
620
 
   from the containing object.  However, the order of array elements is
621
 
   not significant when doing a containment match.
 
626
   from the containing object.
 
627
   But remember that the order of array elements is not significant when
 
628
   doing a containment match, and duplicate array elements are effectively
 
629
   considered only once.
622
630
  </P
623
631
><P
624
632
>   As a special exception to the general principle that the structures
898
906
    while the latter creates index items only for each value in the
899
907
    data.
900
908
    <A
901
 
NAME="AEN7461"
902
 
HREF="#FTN.AEN7461"
 
909
NAME="AEN7477"
 
910
HREF="#FTN.AEN7477"
903
911
><SPAN
904
912
CLASS="footnote"
905
913
>[1]</SPAN
1117
1125
VALIGN="TOP"
1118
1126
WIDTH="5%"
1119
1127
><A
1120
 
NAME="FTN.AEN7461"
1121
 
HREF="datatype-json.html#AEN7461"
 
1128
NAME="FTN.AEN7477"
 
1129
HREF="datatype-json.html#AEN7477"
1122
1130
><SPAN
1123
1131
CLASS="footnote"
1124
1132
>[1]</SPAN