should be it
This commit is contained in:
34
external/duckdb/test/sql/upsert/minimal_reproducable_example.test
vendored
Normal file
34
external/duckdb/test/sql/upsert/minimal_reproducable_example.test
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
# name: test/sql/upsert/minimal_reproducable_example.test
|
||||
# group: [upsert]
|
||||
|
||||
statement ok
|
||||
pragma enable_verification;
|
||||
|
||||
# Create a table with 3 columns, 2 of which are indexed on
|
||||
statement ok
|
||||
create or replace table tbl(
|
||||
i integer PRIMARY KEY,
|
||||
j integer UNIQUE,
|
||||
k integer
|
||||
);
|
||||
|
||||
# Add 3 rows
|
||||
statement ok
|
||||
insert into tbl VALUES (1, 10, 1), (2, 20, 1), (3, 30, 2);
|
||||
|
||||
query III
|
||||
select * from tbl;
|
||||
----
|
||||
1 10 1
|
||||
2 20 1
|
||||
3 30 2
|
||||
|
||||
statement ok
|
||||
insert into tbl VALUES (3,5,1) ON CONFLICT (i) DO UPDATE SET k = k + excluded.k;
|
||||
|
||||
query III
|
||||
select * from tbl;
|
||||
----
|
||||
1 10 1
|
||||
2 20 1
|
||||
3 30 3
|
||||
Reference in New Issue
Block a user