Skip to content

Commit

Permalink
[yugabyte#6511] YSQL: WARNING: 0A000: WITH clause not supported yet
Browse files Browse the repository at this point in the history
Summary:
In yugabyte#6511, it was pointed out that in the following example:

```
with a as (
  select 1 as k)
delete from t
where k in (select k from a);
```

we throw the following warning:
```
WARNING:  0A000: WITH clause not supported yet
LINE 1: with a as (
        ^
HINT:  Please report the issue on https://github.com/YugaByte/yugabyte-db/issues
LOCATION:  raise_feature_not_supported_signal, gram.y:17327
```
However, we do support WITH clause, and this warning notwithstanding,
the delete does go through fine. As part of this change, removed this
warning message, and also imported PG tests for WITH clause.

The imported PG tests have the following major changes:
1) Temporary tables have been replaced by normal tables due to yugabyte#6783
2) Disabled the failing for test for updating a row more than once in different parts of a wCTE, will be handled separately in yugabyte#6782

Test Plan: ybd --scb --sj --java-test org.yb.pgsql.TestPgRegressWithClause

Reviewers: mihnea, neil

Reviewed By: neil

Subscribers: yql

Differential Revision: https://phabricator.dev.yugabyte.com/D10257
  • Loading branch information
deeps1991 authored and Alex Ball committed Mar 9, 2021
1 parent 3f9b83a commit 9f844b6
Show file tree
Hide file tree
Showing 4 changed files with 3,276 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/postgres/src/backend/parser/gram.y
Original file line number Diff line number Diff line change
Expand Up @@ -11940,9 +11940,6 @@ DeleteStmt: opt_with_clause DELETE_P FROM relation_expr_opt_alias
n->whereClause = $6;
n->returningList = $7;
n->withClause = $1;
if (n->withClause != NULL) {
parser_ybc_not_support(@1, "WITH clause");
}
$$ = (Node *)n;
}
;
Expand Down
Loading

0 comments on commit 9f844b6

Please sign in to comment.