Re: CREATE OR REPLACE MATERIALIZED VIEW

2019-01-09 Thread Aidan Samuel
On Thu, 10 Jan 2019 at 12:13, Tom Lane wrote: > For indivisible database objects such as functions, IMV the "or replace" > semantics (COR) is better than the "if not exists" semantics (CINE)... > > For tables, though, the tradeoffs seem pretty different... Thanks Tom, your explanation makes a lot

Re: CREATE OR REPLACE MATERIALIZED VIEW

2019-01-09 Thread Tom Lane
Aidan Samuel writes: > How come table creation doesn't allow [ OR REPLACE ], and view creation > doesn't allow [ IF NOT EXISTS ]? Is this just how the SQL spec defines > things? I think all that stuff is our own fault rather than something you can find in the SQL spec. For indivisible database o

CREATE OR REPLACE MATERIALIZED VIEW

2019-01-09 Thread Aidan Samuel
tax is the inverse and has [ OR REPLACE ], but no [ IF NOT EXISTS ]. I also noticed that the syntax for creating VIEWS and creating MATERIALISED VIEWS is handled separately [1][2]. I was expecting to see one page of documentation with the syntax listed as something like: CREATE [ OR REPLACE ] [ MATERIALI