Add test to insert into a view and expect location header return

This commit is contained in:
Wolfgang Walther
2020-11-03 10:43:06 -05:00
committed by Steve Chavez
parent a7403fecc2
commit 122fea1507
3 changed files with 23 additions and 22 deletions
+8 -17
View File
@@ -460,12 +460,19 @@ CREATE TABLE complex_items (
--
CREATE TABLE compound_pk (
-- those columns should not be referenced to in a foreign key anywhere
-- to allow the InsertSpec.Inserting into VIEWs.returns a location header
-- to test properly
PRIMARY KEY (k1, k2),
k1 integer NOT NULL,
k2 text NOT NULL,
extra integer
);
CREATE VIEW compound_pk_view AS
SELECT * FROM compound_pk;
--
-- Name: empty_table; Type: TABLE; Schema: test; Owner: -
--
@@ -632,6 +639,7 @@ CREATE VIEW projects_view_alt AS
--
CREATE TABLE simple_pk (
PRIMARY KEY (k),
k character varying NOT NULL,
extra character varying NOT NULL
);
@@ -785,23 +793,6 @@ ALTER TABLE ONLY auto_incrementing_pk
ALTER TABLE ONLY complex_items
ADD CONSTRAINT complex_items_pkey PRIMARY KEY (id);
--
-- Name: compound_pk_pkey; Type: CONSTRAINT; Schema: test; Owner: -
--
ALTER TABLE ONLY compound_pk
ADD CONSTRAINT compound_pk_pkey PRIMARY KEY (k1, k2);
--
-- Name: contacts_pkey; Type: CONSTRAINT; Schema: test; Owner: -
--
ALTER TABLE ONLY simple_pk
ADD CONSTRAINT contacts_pkey PRIMARY KEY (k);
--
-- Name: has_fk_pkey; Type: CONSTRAINT; Schema: test; Owner: -
--