Add UPSERT for POST with Prefer:resoultion=merge/ignore-duplicates
This commit is contained in:
committed by
Steve Chávez
parent
102392e4ab
commit
85b1dc0eb4
Vendored
+9
-3
@@ -334,6 +334,12 @@ INSERT INTO part VALUES (1), (2), (3), (4);
|
||||
|
||||
TRUNCATE TABLE being_part CASCADE;
|
||||
INSERT INTO being_part VALUES (1,1), (2,1), (3,2), (4,3);
|
||||
--
|
||||
-- PostgreSQL database dump complete
|
||||
--
|
||||
|
||||
TRUNCATE TABLE employees CASCADE;
|
||||
INSERT INTO employees VALUES
|
||||
('Frances M.', 'Roe', '24000', 'One-Up Realty', 'Author'),
|
||||
('Daniel B.', 'Lyon', '36000', 'Dubrow''s Cafeteria', 'Packer'),
|
||||
('Edwin S.', 'Smith', '48000', 'Pro Garden Management', 'Marine biologist');
|
||||
|
||||
TRUNCATE TABLE tiobe_pls CASCADE;
|
||||
INSERT INTO tiobe_pls VALUES ('Java', 1), ('C', 2), ('Python', 4);
|
||||
|
||||
Vendored
+2
@@ -63,6 +63,8 @@ GRANT ALL ON TABLE
|
||||
, part
|
||||
, leak
|
||||
, perf_articles
|
||||
, employees
|
||||
, tiobe_pls
|
||||
TO postgrest_test_anonymous;
|
||||
|
||||
GRANT INSERT ON TABLE insertonly TO postgrest_test_anonymous;
|
||||
|
||||
Vendored
+14
@@ -1357,3 +1357,17 @@ create table test.perf_articles(
|
||||
id integer not null,
|
||||
body text not null
|
||||
);
|
||||
|
||||
create table test.employees(
|
||||
first_name text,
|
||||
last_name text,
|
||||
salary money,
|
||||
company text,
|
||||
occupation text,
|
||||
primary key(first_name, last_name)
|
||||
);
|
||||
|
||||
create table test.tiobe_pls(
|
||||
name text primary key,
|
||||
rank smallint
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user