feat: add limited update

This commit is contained in:
steve-chavez
2022-03-26 15:29:13 +01:00
committed by Steve Chavez
parent 799daa7556
commit f4becf99ad
9 changed files with 291 additions and 18 deletions
+31
View File
@@ -2465,3 +2465,34 @@ CREATE AGGREGATE test.unsupported_agg (*) (
SFUNC = public.dummy,
STYPE = int
);
create view no_pk_view as
select * from no_pk;
create table limited_update_items(
id int primary key
, name text
);
create table limited_update_items_cpk(
id int
, name text
, primary key (id, name)
);
create table limited_update_items_no_pk(
id int
, name text
);
create view limited_update_items_view as
select * from limited_update_items;
create function reset_limited_items(tbl_name text default '') returns void as $_$ begin
execute format(
$$
delete from %I;
insert into %I values (1, 'item-1'), (2, 'item-2'), (3, 'item-3');
$$::text,
tbl_name, tbl_name);
end; $_$ language plpgsql volatile;