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

Commit6540cc5

Browse files
committed
Fix vague comment in jsonb documentation
The sample query fails because of an attempt to update the key of a numeric.But the comment says it's just because of the missing object key. That's notcorrect because jsonb subscription automatically adds missing keys.Reported-by: Nikita Konev
1 parent14d9b37 commit6540cc5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎doc/src/sgml/json.sgml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,8 @@ SELECT ('[1, "2", null]'::jsonb)[1];
648648
UPDATE table_name SET jsonb_field['key'] = '1';
649649

650650
-- This will raise an error if any record's jsonb_field['a']['b'] is something
651-
-- other than an object. For example, the value {"a": 1} has no 'b' key.
651+
-- other than an object. For example, the value {"a": 1} has a numeric value
652+
-- of the key 'a'.
652653
UPDATE table_name SET jsonb_field['a']['b']['c'] = '1';
653654

654655
-- Filter records using a WHERE clause with subscripting. Since the result of

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp