1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-14 18:42:34 +03:00

Revert "Modified files for MERGE"

This reverts commit 354f13855e.
This commit is contained in:
Simon Riggs
2018-04-02 21:34:15 +01:00
parent 354f13855e
commit 7cf8a5c302
82 changed files with 165 additions and 2570 deletions

View File

@ -93,22 +93,6 @@ COMMIT;
/* display results */
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');
-- MERGE support
BEGIN;
MERGE INTO replication_example t
USING (SELECT i as id, i as data, i as num FROM generate_series(-20, 5) i) s
ON t.id = s.id
WHEN MATCHED AND t.id < 0 THEN
UPDATE SET somenum = somenum + 1
WHEN MATCHED AND t.id >= 0 THEN
DELETE
WHEN NOT MATCHED THEN
INSERT VALUES (s.*);
COMMIT;
/* display results */
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');
CREATE TABLE tr_unique(id2 serial unique NOT NULL, data int);
INSERT INTO tr_unique(data) VALUES(10);
ALTER TABLE tr_unique RENAME TO tr_pkey;