Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit23d29ce

Browse files
committed
docs: Map operator @> to the proper SGML escape for '>'
Backpatch through 9.5
1 parentb852dc4 commit23d29ce

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

‎doc/src/sgml/json.sgml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -267,30 +267,30 @@ SELECT '{"reading": 1.230e-5}'::json, '{"reading": 1.230e-5}'::jsonb;
267267
</para>
268268
<programlisting>
269269
-- Simple scalar/primitive values contain only the identical value:
270-
SELECT '"foo"'::jsonb @> '"foo"'::jsonb;
270+
SELECT '"foo"'::jsonb @&gt; '"foo"'::jsonb;
271271

272272
-- The array on the right side is contained within the one on the left:
273-
SELECT '[1, 2, 3]'::jsonb @> '[1, 3]'::jsonb;
273+
SELECT '[1, 2, 3]'::jsonb @&gt; '[1, 3]'::jsonb;
274274

275275
-- Order of array elements is not significant, so this is also true:
276-
SELECT '[1, 2, 3]'::jsonb @> '[3, 1]'::jsonb;
276+
SELECT '[1, 2, 3]'::jsonb @&gt; '[3, 1]'::jsonb;
277277

278278
-- Duplicate array elements don't matter either:
279-
SELECT '[1, 2, 3]'::jsonb @> '[1, 2, 2]'::jsonb;
279+
SELECT '[1, 2, 3]'::jsonb @&gt; '[1, 2, 2]'::jsonb;
280280

281281
-- The object with a single pair on the right side is contained
282282
-- within the object on the left side:
283-
SELECT '{"product": "PostgreSQL", "version": 9.4, "jsonb":true}'::jsonb @> '{"version":9.4}'::jsonb;
283+
SELECT '{"product": "PostgreSQL", "version": 9.4, "jsonb":true}'::jsonb @&gt; '{"version":9.4}'::jsonb;
284284

285285
-- The array on the right side is <emphasis>not</> considered contained within the
286286
-- array on the left, even though a similar array is nested within it:
287-
SELECT '[1, 2, [1, 3]]'::jsonb @> '[1, 3]'::jsonb; -- yields false
287+
SELECT '[1, 2, [1, 3]]'::jsonb @&gt; '[1, 3]'::jsonb; -- yields false
288288

289289
-- But with a layer of nesting, it is contained:
290-
SELECT '[1, 2, [1, 3]]'::jsonb @> '[[1, 3]]'::jsonb;
290+
SELECT '[1, 2, [1, 3]]'::jsonb @&gt; '[[1, 3]]'::jsonb;
291291

292292
-- Similarly, containment is not reported here:
293-
SELECT '{"foo": {"bar": "baz"}}'::jsonb @> '{"bar": "baz"}'::jsonb; -- yields false
293+
SELECT '{"foo": {"bar": "baz"}}'::jsonb @&gt; '{"bar": "baz"}'::jsonb; -- yields false
294294
</programlisting>
295295

296296
<para>
@@ -309,10 +309,10 @@ SELECT '{"foo": {"bar": "baz"}}'::jsonb @> '{"bar": "baz"}'::jsonb; -- yields f
309309
</para>
310310
<programlisting>
311311
-- This array contains the primitive string value:
312-
SELECT '["foo", "bar"]'::jsonb @> '"bar"'::jsonb;
312+
SELECT '["foo", "bar"]'::jsonb @&gt; '"bar"'::jsonb;
313313

314314
-- This exception is not reciprocal -- non-containment is reported here:
315-
SELECT '"bar"'::jsonb @> '["bar"]'::jsonb; -- yields false
315+
SELECT '"bar"'::jsonb @&gt; '["bar"]'::jsonb; -- yields false
316316
</programlisting>
317317

318318
<para>

‎doc/src/sgml/rangetypes.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ INSERT INTO reservation VALUES
7979
(1108, '[2010-01-01 14:30, 2010-01-01 15:30)');
8080

8181
-- Containment
82-
SELECT int4range(10, 20) @> 3;
82+
SELECT int4range(10, 20) @&gt; 3;
8383

8484
-- Overlaps
8585
SELECT numrange(11.1, 22.2) &amp;&amp; numrange(20.0, 30.0);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp