-
Notifications
You must be signed in to change notification settings - Fork 8.6k
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
Fix parent-child relationship #6126
base: master
Are you sure you want to change the base?
Fix parent-child relationship #6126
Conversation
@@ -143,7 +143,7 @@ INSERT INTO profile_group_execution | |||
, status, count, error_msg, error_code) | |||
VALUES (now(), now(), ?, ?, ? | |||
, ?, ?, ?, ?) | |||
RETURNING (id, gmt_create, gmt_modified, group_id, mode, sql, status, count, error_msg, error_code) | |||
RETURNING id, gmt_create, gmt_modified, group_id, mode, sql, status, count, error_msg, error_code |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
根据PG文档 returning 不需要括号:https://www.postgresql.org/docs/current/dml-returning.html
@@ -166,7 +166,7 @@ public void test_2() throws Exception { | |||
+ "\t, ACCOUNT_ID, SUBTOTAL_DETAILBILL_ID, NVL(ACCT_HOME_COUNTY, -1)\n" | |||
+ "\t, TO_CHAR(NVL(BILLCYCLE_INURE_DATE, TO_DATE(TO_CHAR(GEN_TIME, 'yyyymm'), 'yyyymm')), 'yyyymmdd')\n" | |||
+ "\t, NVL(BILLCYCLE_MONTH, -1)\n" + "\t, NVL(Detailbill_Flag, 0)\n" | |||
+ "INTO (:b0, :b1, :b2, :b3, :b4, :b5, :b6, :b7, :b8, :b9, :b10, :b11, :b12, :b13, :b14, :b15, :b16, :b17, :b18, :b19, :b20:b21, :b22:b23, :b24:b25, :b26:b27, :b28:b29, :b30, :b31, :b32, :b33)\n" | |||
+ "INTO :b0, :b1, :b2, :b3, :b4, :b5, :b6, :b7, :b8, :b9, :b10, :b11, :b12, :b13, :b14, :b15, :b16, :b17, :b18, :b19, :b20:b21, :b22:b23, :b24:b25, :b26:b27, :b28:b29, :b30, :b31, :b32, :b33\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
x.getTarget().accept(this); | ||
print0(" := "); | ||
x.getValue().accept(this); | ||
return false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
super.visit(x);
会使用SQLASTOutputVisitor
的方法,用=
来赋值,但是PG支持两种,:=
更常用(https://www.postgresql.org/docs/current/plpgsql-statements.html)
@wenshao 可以看下这个吗 |
9f1c61d
to
558ea7d
Compare
Changes:
SQLListExpr