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

Commit2172455

Browse files
committed
Fix collation of JSON_TABLE output columns
The output columns of JSON_TABLE should have the collations of theirdata type. The existing implementation sets the default collation ifthe type is collatable.Reviewed-by: Andrew Dunstan <andrew@dunslane.net>Discussion:https://www.postgresql.org/message-id/flat/9d75ce67-0121-5050-5bec-bf5009db55ce%40enterprisedb.com
1 parent4a8a5dd commit2172455

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

‎src/backend/parser/parse_jsontable.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -514,10 +514,7 @@ appendJsonTableColumns(JsonTableContext *cxt, List *columns)
514514

515515
tf->coltypes=lappend_oid(tf->coltypes,typid);
516516
tf->coltypmods=lappend_int(tf->coltypmods,typmod);
517-
tf->colcollations=lappend_oid(tf->colcollations,
518-
type_is_collatable(typid)
519-
?DEFAULT_COLLATION_OID
520-
:InvalidOid);
517+
tf->colcollations=lappend_oid(tf->colcollations,get_typcollation(typid));
521518
tf->colvalexprs=lappend(tf->colvalexprs,colexpr);
522519
}
523520
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp