Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
23d29cef
Commit
23d29cef
authored
10 years ago
by
Bruce Momjian
Browse files
Options
Downloads
Patches
Plain Diff
docs: Map operator @> to the proper SGML escape for '>'
Backpatch through 9.5
parent
b852dc4c
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
doc/src/sgml/json.sgml
+10
-10
10 additions, 10 deletions
doc/src/sgml/json.sgml
doc/src/sgml/rangetypes.sgml
+1
-1
1 addition, 1 deletion
doc/src/sgml/rangetypes.sgml
with
11 additions
and
11 deletions
doc/src/sgml/json.sgml
+
10
−
10
View file @
23d29cef
...
...
@@ -267,30 +267,30 @@ SELECT '{"reading": 1.230e-5}'::json, '{"reading": 1.230e-5}'::jsonb;
</para>
<programlisting>
-- Simple scalar/primitive values contain only the identical value:
SELECT '"foo"'::jsonb @
>
'"foo"'::jsonb;
SELECT '"foo"'::jsonb @
>
'"foo"'::jsonb;
-- The array on the right side is contained within the one on the left:
SELECT '[1, 2, 3]'::jsonb @
>
'[1, 3]'::jsonb;
SELECT '[1, 2, 3]'::jsonb @
>
'[1, 3]'::jsonb;
-- Order of array elements is not significant, so this is also true:
SELECT '[1, 2, 3]'::jsonb @
>
'[3, 1]'::jsonb;
SELECT '[1, 2, 3]'::jsonb @
>
'[3, 1]'::jsonb;
-- Duplicate array elements don't matter either:
SELECT '[1, 2, 3]'::jsonb @
>
'[1, 2, 2]'::jsonb;
SELECT '[1, 2, 3]'::jsonb @
>
'[1, 2, 2]'::jsonb;
-- The object with a single pair on the right side is contained
-- within the object on the left side:
SELECT '{"product": "PostgreSQL", "version": 9.4, "jsonb":true}'::jsonb @
>
'{"version":9.4}'::jsonb;
SELECT '{"product": "PostgreSQL", "version": 9.4, "jsonb":true}'::jsonb @
>
'{"version":9.4}'::jsonb;
-- The array on the right side is <emphasis>not</> considered contained within the
-- array on the left, even though a similar array is nested within it:
SELECT '[1, 2, [1, 3]]'::jsonb @
>
'[1, 3]'::jsonb; -- yields false
SELECT '[1, 2, [1, 3]]'::jsonb @
>
'[1, 3]'::jsonb; -- yields false
-- But with a layer of nesting, it is contained:
SELECT '[1, 2, [1, 3]]'::jsonb @
>
'[[1, 3]]'::jsonb;
SELECT '[1, 2, [1, 3]]'::jsonb @
>
'[[1, 3]]'::jsonb;
-- Similarly, containment is not reported here:
SELECT '{"foo": {"bar": "baz"}}'::jsonb @
>
'{"bar": "baz"}'::jsonb; -- yields false
SELECT '{"foo": {"bar": "baz"}}'::jsonb @
>
'{"bar": "baz"}'::jsonb; -- yields false
</programlisting>
<para>
...
...
@@ -309,10 +309,10 @@ SELECT '{"foo": {"bar": "baz"}}'::jsonb @> '{"bar": "baz"}'::jsonb; -- yields f
</para>
<programlisting>
-- This array contains the primitive string value:
SELECT '["foo", "bar"]'::jsonb @
>
'"bar"'::jsonb;
SELECT '["foo", "bar"]'::jsonb @
>
'"bar"'::jsonb;
-- This exception is not reciprocal -- non-containment is reported here:
SELECT '"bar"'::jsonb @
>
'["bar"]'::jsonb; -- yields false
SELECT '"bar"'::jsonb @
>
'["bar"]'::jsonb; -- yields false
</programlisting>
<para>
...
...
This diff is collapsed.
Click to expand it.
doc/src/sgml/rangetypes.sgml
+
1
−
1
View file @
23d29cef
...
...
@@ -79,7 +79,7 @@ INSERT INTO reservation VALUES
(1108, '[2010-01-01 14:30, 2010-01-01 15:30)');
-- Containment
SELECT int4range(10, 20) @
>
3;
SELECT int4range(10, 20) @
>
3;
-- Overlaps
SELECT numrange(11.1, 22.2) && numrange(20.0, 30.0);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment