1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
|
---
--- pgcopydb test/cdc/ddl.sql
---
--- This file implements DDL changes in the pagila database.
begin;
alter table payment_p2022_01 replica identity full;
alter table payment_p2022_02 replica identity full;
alter table payment_p2022_03 replica identity full;
alter table payment_p2022_04 replica identity full;
alter table payment_p2022_05 replica identity full;
alter table payment_p2022_06 replica identity full;
alter table payment_p2022_07 replica identity full;
commit;
begin;
CREATE TABLE IF NOT EXISTS public."""dqname"""
(
id bigserial
);
commit;
begin;
CREATE SCHEMA IF NOT EXISTS "Foo"".Bar";
CREATE TABLE IF NOT EXISTS "Foo"".Bar".":Identifer As ""Column"".$1:"
(
time bigserial,
"[column name]" text,
primary key (time, "[column name]")
);
CREATE SCHEMA IF NOT EXISTS "Unicode""Test";
CREATE TYPE "[Status]" AS ENUM ('new', 'open', 'closed');
CREATE TABLE IF NOT EXISTS "Unicode""Test".U&"\0441\043B\043E\043D"
(
id bigserial,
U&"!0441!043B!043E!043D" UESCAPE '!' "[Status]",
U&"!043A!043E!043B!043E!043D!043A!0430" UESCAPE '!' text,
primary key (id, U&"!0441!043B!043E!043D" UESCAPE '!')
);
commit;
--
-- See https://github.com/dimitri/pgcopydb/issues/736
--
begin;
CREATE TABLE t_bit_types
(
id serial primary key,
a bit(3),
b bit varying(5)
);
INSERT INTO t_bit_types (a,b) VALUES (B'101', B'00');
commit;
begin;
create table if not exists generated_column_test
(
id bigint primary key,
name text,
greet_hello text generated always as ('Hello ' || name) stored,
greet_hi text generated always as ('Hi ' || name) stored,
-- tests identifier escaping
time text generated always as ('identifier 1' || 'now') stored,
email text not null,
-- tests identifier escaping
"table" text generated always as ('identifier 2' || name) stored,
"""table""" text generated always as ('identifier 3' || name) stored,
"""hel""lo""" text generated always as ('identifier 4' || name) stored
);
commit;
|