Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CTEL中表达式为DELETE/UPDATE/INSERT时,结果不符合预期 #794

Open
jd-zhang opened this issue Jul 8, 2022 · 2 comments
Open

Comments

@jd-zhang
Copy link
Contributor

jd-zhang commented Jul 8, 2022

*Issue migrated from trac ticket # 887 www.kunlunbase.com *

component: computing nodes | priority: major

2022-07-08 18:22:40: smith created the issue



create table t1(a int, b int);

insert into t1 values(1,0),(2,0),(3,0),(4,0),(5,0);

WITH t AS (UPDATE t1 SET b=b+1 limit 4 returning *)
SELECT *
FROM t limit 1;

select * from t1;
@jd-zhang
Copy link
Contributor Author

jd-zhang commented Jul 8, 2022

2022-07-08 18:24:44: smith commented


pg不支持updat limit,调整为:

WITH t AS (UPDATE t1 SET b=b+1 returning *)
SELECT *
FROM t limit 1;

@jd-zhang
Copy link
Contributor Author

2022-07-11 11:35:07: smith changed status from new to accepted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant