-
Notifications
You must be signed in to change notification settings - Fork 4.1k
QA: crdb_internal.redactable_sql_constants syntax error on query #99132
Copy link
Copy link
Closed
Labels
C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.O-qaT-sql-queriesSQL Queries TeamSQL Queries Team
Description
When trying to pass the following query through crdb_internal.redactable_sql_constants verbatim, I encounter a syntax error. \hf crdb_internal.redactable_sql_constants is not immediately helpful in figuring out what the issue is.
CREATE TABLE t1 (id INT, colJSON JSON);
SELECT id, colJSON FROM t1 WHERE colJSON?'should_be_redacted';
id | coljson
-----+----------
(0 rows)
SELECT crdb_internal.redactable_sql_constants('SELECT id, colJSON FROM t1 WHERE colJSON?'should_be_redacted'');
invalid syntax: statement ignored: at or near "should_be_redacted": syntax error
SQLSTATE: 42601
DETAIL: source SQL:
SELECT crdb_internal.redactable_sql_constants('SELECT id, colJSON FROM t1 WHERE colJSON?'should_be_redacted'')
^
HINT: try \hf crdb_internal.redactable_sql_constants
There is probably an obvious way to format the query so that it can work as an input. However, it would be nice if there was a way putting queries could be streamlined or some documentation.
Jira issue: CRDB-25716
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.O-qaT-sql-queriesSQL Queries TeamSQL Queries Team
Type
Projects
Status
Done