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

update gp by duck:ERROR: multiple updates to a row by the same query is not allowed #226

Open
wonb168 opened this issue Apr 29, 2024 · 1 comment

Comments

@wonb168
Copy link

wonb168 commented Apr 29, 2024

my sql:

update gp.tenant_peacebird_biz.rst_ra_sku_org_detail a 
set	compute_status='0'
    from tmp_distinct_order_id b
    where a.skc_order_id=b.skc_order_id
    and a.day_date = '2024-04-29' and a.is_deleted = '0';

raise error:

ERROR: duckdb.duckdb.Error: Failed to execute query "UPDATE "tenant_peacebird_biz"."rst_ra_sku_org_detail" 
SET "compute_status" = "update_data_63f7bf5c-4235-4a4b-8c40-ddbdf9382dfa"."compute_status" FROM "update_data_63f7bf5c-4235-4a4b-8c40-ddbdf9382dfa" WHERE "rst_ra_sku_org_detail".ctid=__page_id_string::TID":
 ERROR:  multiple updates to a row by the same query is not allowed  (seg0 172.18.10.106:33000 pid=61539) (plpy_elog.c:121)
  在位置:Traceback (most recent call last):
  PL/Python function "p_rst_ra_skc_org_detail", line 2743, in <module>
    exesql(sql)	
  PL/Python function "p_rst_ra_skc_org_detail", line 19, in exesql
    dd.execute(sql)
PL/Python function "p_rst_ra_skc_org_detail"

If I write the duck table into gp,and then run sql, it's OK:

update tenant_peacebird_biz.rst_ra_sku_org_detail a 
set	compute_status='0'
    from tenant_peacebird_biz.tmp_id b
    where a.skc_order_id=b.skc_order_id
    and a.day_date = '2024-04-29' and a.is_deleted = '0';

why?
and how to resolve?

OS:
Centos7

Greenplum Version:
6.12 (pg:9.4)

DuckDB Version:
0.10.1

DuckDB Client:
python

@wonb168
Copy link
Author

wonb168 commented May 28, 2024

how to do?

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

No branches or pull requests

1 participant