cockroach icon indicating copy to clipboard operation
cockroach copied to clipboard

sql: collation using pg_catalog.default does not work

Open fqazi opened this issue 1 year ago • 2 comments

Currently CRDB does not support the builtin collation pg_catalog.default, which makes it incompatible with PostgresSQL. For example we support the following:

select 'a' < ('foo' COLLATE default);

but on Postgres the following is valid syntax as well.

select 'a' < ('foo' COLLATE pg_catalog.default);

Jira issue: CRDB-38613

Epic CRDB-37763

fqazi avatar May 10 '24 13:05 fqazi

We might need to update the syntax rule for collation names here: https://github.com/cockroachdb/cockroach/blob/c1828e71175a0406380c8295ec23cd71d295621d/pkg/sql/parser/sql.y#L16721

rafiss avatar May 14 '24 18:05 rafiss

Also part of the original customer feedback: the original SQL that was not working was generated by the \d <table_or_view_name> command. So the customer is not just saying "hey this SQL doesn't work", but also "why does the describe command produce SQL that doesn't work".

marksoper avatar May 15 '24 18:05 marksoper