Here's a rebased v5 due to conflicts with de1e298857. No other changes
since v4.
--
Erik Wienhold
From ac9bba0960f7a6fa507020400f1b4bcf4c9a25d3 Mon Sep 17 00:00:00 2001
From: Erik Wienhold
Date: Tue, 21 May 2024 18:35:47 +0200
Subject: [PATCH v5 1/3] Add CREATE OR REPLACE MATERIALIZED
On Tue, Jul 02, 2024 at 01:46:21PM +0300, Aleksander Alekseev wrote:
> I can imagine how this may impact many applications and upset many
> software developers worldwide. Was there even a precedent (in the
> recent decade or so) when PostgreSQL broke the SQL syntax?
We're usually very careful abou
ng it and then run the concurrent refresh, like
> > > > this:
> > > >
> > > > CREATE OR REPLACE MATERIALIZED VIEW foo AS ... WITH NO DATA;
> > > > REFRESH MATERIALIZED VIEW CONCURRENTLY foo;
> > > >
> > > > But that wo
covers all matview cases in psql's tab completion. I
> missed some of them with v1.
Here's a rebased version due to conflicts with f683d3a4ca and
1e35951e71. No other changes since v2.
--
Erik
>From 158f025fa2696a4a807def4a3c533982cfd7b318 Mon Sep 17 00:00:00 2001
From: Erik Wienhold
Date: Tue, 21 May 20
On 2024-07-12 16:49 +0200, Said Assemlal wrote:
> > My initial idea, while writing the patch, was that one could replace the
> > matview without populating it and then run the concurrent refresh, like
> > this:
> >
> > CREATE OR REPLACE MATERIALIZE
concurrent refresh, like
this:
CREATE OR REPLACE MATERIALIZED VIEW foo AS ... WITH NO DATA;
REFRESH MATERIALIZED VIEW CONCURRENTLY foo;
But that won't work because concurrent refresh requires an already
populated matview.
Right now the patch either populates the replaced matview or l
This is also the case for CREATE OR REPLACE VIEW.
My initial idea, while writing the patch, was that one could replace the
matview without populating it and then run the concurrent refresh, like
this:
CREATE OR REPLACE MATERIALIZED VIEW foo AS ... WITH NO DATA;
REFRESH MATERIALIZED VIEW CON
CREATE OR REPLACE VIEW:
* the new query may change SELECT list expressions of existing columns
* new columns can be added to the end of the SELECT list
* existing columns cannot be renamed
* the data type of existing columns cannot be changed
In addition to that, CREATE OR REPLACE MATERIALIZED VIEW
> On 2 Jul 2024, at 15:58, Erik Wienhold wrote:
> On 2024-07-02 14:27 +0200, Daniel Gustafsson wrote:
>> Considering the runway we typically give for deprecations, that seems like a
>> fairly short timeframe for a SQL level command which isn't unlikely to exist
>> in application code.
>
> Is ther
I wrote:
> Patch 0002 deprecates CREATE MATERIALIZED VIEW IF NOT EXISTS because it
> no longer seems necessary with patch 0001. Tom Lane commented[1] about
> the general dislike of IF NOT EXISTS, to which I agree, but maybe this
> was meant only in response to adding new commands.
One could also
> On 2 Jul 2024, at 03:22, Erik Wienhold wrote:
> Patch 0002 deprecates CREATE MATERIALIZED VIEW IF NOT EXISTS because it
> no longer seems necessary with patch 0001. Tom Lane commented[1] about
> the general dislike of IF NOT EXISTS, to which I agree, but maybe this
> was meant only in response
Hi,
> Patch 0002 deprecates CREATE MATERIALIZED VIEW IF NOT EXISTS because it
> no longer seems necessary with patch 0001. Tom Lane commented[1] about
> the general dislike of IF NOT EXISTS, to which I agree, but maybe this
> was meant only in response to adding new commands. Anyway, my idea is
I like to add CREATE OR REPLACE MATERIALIZED VIEW with the attached
patches.
Patch 0001 adds CREATE OR REPLACE MATERIALIZED VIEW similar to CREATE OR
REPLACE VIEW. It also includes regression tests and changes to docs.
Patch 0002 deprecates CREATE MATERIALIZED VIEW IF NOT EXISTS because it
no
13 matches
Mail list logo