JSON_TABLE output collations

Started by Peter Eisentrautalmost 4 years ago2 messageshackers
Jump to latest
#1Peter Eisentraut
peter_e@gmx.net

The present implementation of JSON_TABLE sets the collation of the
output columns to the default collation if the specified data type is
collatable. Why don't we use the collation of the type directly? This
would make domains with attached collations work correctly.

See attached patch for how to change this. I hacked up a regression
test case to demonstrate this.

Attachments:

0001-Fix-collation-of-JSON_TABLE-output-columns.patchtext/plain; charset=UTF-8; name=0001-Fix-collation-of-JSON_TABLE-output-columns.patchDownload+7-7
#2Andrew Dunstan
andrew@dunslane.net
In reply to: Peter Eisentraut (#1)
Re: JSON_TABLE output collations

On 2022-06-07 Tu 09:19, Peter Eisentraut wrote:

The present implementation of JSON_TABLE sets the collation of the
output columns to the default collation if the specified data type is
collatable.  Why don't we use the collation of the type directly? 
This would make domains with attached collations work correctly.

See attached patch for how to change this.  I hacked up a regression
test case to demonstrate this.

Looks reasonable.

cheers

andrew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com