CREATE VIEW datatype_view AS
SELECT * FROM datatype_table;
NOTICE: DDL test: type simple, tag CREATE VIEW
+CREATE OR REPLACE VIEW datatype_view AS
+ SELECT * FROM datatype_table, static_view;
+NOTICE: DDL test: type simple, tag CREATE VIEW
+NOTICE: DDL test: type alter table, tag CREATE VIEW
+NOTICE: subcommand: type ADD COLUMN TO VIEW desc column col of view datatype_view
+NOTICE: subcommand: type REPLACE RELOPTIONS desc <NULL>
CREATE RECURSIVE VIEW nums_1_100 (n) AS
VALUES (1)
UNION ALL
CREATE TABLE one (col_a SERIAL PRIMARY KEY, col_b text DEFAULT 'forty two', col_c SERIAL)
CREATE INDEX one_idx ON one (col_b)
CREATE TABLE two (col_c INTEGER CHECK (col_c > 0) REFERENCES one DEFAULT 42)
- CREATE TABLE id (col_d int NOT NULL GENERATED ALWAYS AS IDENTITY);
+ CREATE TABLE id (col_d int NOT NULL GENERATED ALWAYS AS IDENTITY)
+ CREATE VIEW one_view AS SELECT * FROM two;
NOTICE: END: command_tag=CREATE SCHEMA type=schema identity=evttrig
NOTICE: END: command_tag=CREATE SEQUENCE type=sequence identity=evttrig.one_col_a_seq
NOTICE: END: command_tag=CREATE SEQUENCE type=sequence identity=evttrig.one_col_c_seq
NOTICE: END: command_tag=CREATE SEQUENCE type=sequence identity=evttrig.id_col_d_seq
NOTICE: END: command_tag=CREATE TABLE type=table identity=evttrig.id
NOTICE: END: command_tag=ALTER SEQUENCE type=sequence identity=evttrig.id_col_d_seq
+NOTICE: END: command_tag=CREATE VIEW type=view identity=evttrig.one_view
NOTICE: END: command_tag=CREATE INDEX type=index identity=evttrig.one_idx
+-- View with column additions
+CREATE OR REPLACE VIEW evttrig.one_view AS SELECT * FROM evttrig.two, evttrig.id;
+NOTICE: END: command_tag=CREATE VIEW type=view identity=evttrig.one_view
+NOTICE: END: command_tag=CREATE VIEW type=view identity=evttrig.one_view
+DROP VIEW evttrig.one_view;
+NOTICE: NORMAL: orig=t normal=f istemp=f type=view identity=evttrig.one_view schema=evttrig name=one_view addr={evttrig,one_view} args={}
-- Partitioned tables with a partitioned index
CREATE TABLE evttrig.parted (
id int PRIMARY KEY)
CREATE TABLE one (col_a SERIAL PRIMARY KEY, col_b text DEFAULT 'forty two', col_c SERIAL)
CREATE INDEX one_idx ON one (col_b)
CREATE TABLE two (col_c INTEGER CHECK (col_c > 0) REFERENCES one DEFAULT 42)
- CREATE TABLE id (col_d int NOT NULL GENERATED ALWAYS AS IDENTITY);
+ CREATE TABLE id (col_d int NOT NULL GENERATED ALWAYS AS IDENTITY)
+ CREATE VIEW one_view AS SELECT * FROM two;
+
+-- View with column additions
+CREATE OR REPLACE VIEW evttrig.one_view AS SELECT * FROM evttrig.two, evttrig.id;
+DROP VIEW evttrig.one_view;
-- Partitioned tables with a partitioned index
CREATE TABLE evttrig.parted (