cockroachdb / cockroach

CockroachDB — the cloud native, distributed SQL database designed for high availability, effortless scale, and control over data placement.
https://www.cockroachlabs.com
Other
29.97k stars 3.79k forks source link

sql: support unicode escapes #115143

Open rharding6373 opened 10 months ago

rharding6373 commented 10 months ago

The following syntax is supported in postgres, but in crdb results in a syntax error:

SELECT U&'d\0061t\+000061' AS U&"d\0061t\+000061";
-- postgres: data

SELECT U&'d!0061t\+000061' UESCAPE '!' AS U&"d*0061t\+000061" UESCAPE '*';
-- postgres: dat\+000061

SELECT U&'a\\b' AS "a\b";
-- postgres: a\b

SELECT E'\\x De Ad Be Ef '::bytea;
-- postgres: \xdeadbeef

Found in pg_regress strings

Jira issue: CRDB-33912

yuzefovich commented 9 months ago

Probably related to #26128