feat: Include partitioned tables into the schema cache
Allows embedding, UPSERT, INSERT with Location response, OPTIONS request and OpenAPI support for partitioned tables
This commit is contained in:
Vendored
+25
@@ -663,3 +663,28 @@ INSERT INTO private.films (id, title) VALUES (12,'douze commandements'), (2001,'
|
||||
|
||||
TRUNCATE TABLE private.personnages CASCADE;
|
||||
INSERT INTO private.personnages (film_id, role_id, character) VALUES (12,1,'méchant'), (2001,2,'astronaute');
|
||||
|
||||
DO $do$BEGIN
|
||||
IF (SELECT current_setting('server_version_num')::INT >= 100000) THEN
|
||||
INSERT INTO test.partitioned_a(id, name) VALUES (1,'first');
|
||||
INSERT INTO test.partitioned_a(id, name) VALUES (2,'first');
|
||||
INSERT INTO test.partitioned_a(id, name) VALUES (3,'second');
|
||||
INSERT INTO test.partitioned_a(id, name) VALUES (4,'second');
|
||||
END IF;
|
||||
|
||||
IF (SELECT current_setting('server_version_num')::INT >= 110000) THEN
|
||||
INSERT INTO test.reference_from_partitioned(id) VALUES (1),(2);
|
||||
|
||||
UPDATE test.partitioned_a SET id_ref = 1 WHERE id = 1;
|
||||
END IF;
|
||||
|
||||
IF (SELECT current_setting('server_version_num')::INT >= 120000) THEN
|
||||
INSERT INTO test.partitioned_b(id, name) VALUES (1,'first_b');
|
||||
INSERT INTO test.partitioned_b(id, name, id_a, name_a) VALUES (2,'first_b', 2, 'first');
|
||||
INSERT INTO test.partitioned_b(id, name) VALUES (3,'second_b');
|
||||
INSERT INTO test.partitioned_b(id, name, id_a, name_a) VALUES (4,'second_b', 4, 'second');
|
||||
|
||||
INSERT INTO test.reference_to_partitioned(id) VALUES (1);
|
||||
INSERT INTO test.reference_to_partitioned(id, id_a, name_a) VALUES (2, 2, 'first');
|
||||
END IF;
|
||||
END$do$;
|
||||
Reference in New Issue
Block a user