cockroachdb / cockroachdb/cockroach

sql: support unicode escapes

Open
#115,143 1 comment 0 reactions 0 assignees View on GitHub
A-sql-pgcompat C-bug O-pg-regress P-3 T-sql-queries
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

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

Contributor guide

Open the contributing guide

Research direction

Start by locating the pg_regress strings referenced in the issue and run the listed SQL examples against CockroachDB to reproduce the syntax errors. Compare the results with the PostgreSQL comments; done means the Unicode and escape syntaxes parse and produce the expected results, including the bytea value.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgres, sql
Domain
databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.