From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | dmitry(dot)telpt(at)gmail(dot)com |
Cc: | pgsql-bugs(at)lists(dot)postgresql(dot)org |
Subject: | Re: BUG #16119: pg_dump omits columns specification for matviews |
Date: | 2019-11-16 06:05:36 |
Message-ID: | 6368.1573884336@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
PG Bug reporting form <noreply(at)postgresql(dot)org> writes:
> We've faced up with an issue how pg_dump exports materialzed views, it
> doesn't export columns declaration that is legal parameter of CREATE DDL
> instruction.
> As I can see from db_dump source, it's intent behaviour and supposed that
> columns declarion will be picked up from query statement when matview is
> created by target instance. However, if matview is 'static' (doesn't have a
> query statement), it sets default column names (column1, column2, etc) that
> breaks all dependent tables/views/matviews, for instance:
> postgres=> CREATE MATERIALIZED VIEW test_mv
> (id, alias) AS
> VALUES (1, 5), (2, 6), (3, 17)
> ;
Hmm ... I agree this is not good, but this example doesn't seem like
a matview that anyone would create in practice. For curiosity's sake,
would you explain the actual use-case that you hit this in?
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Florian Koch | 2019-11-16 07:40:27 | Bug when creating domain from composite types |
Previous Message | Tomas Vondra | 2019-11-16 01:36:42 | Re: BUG #16111: Unexpected query compilation error “negative bitmapset member not allowed” |