From: | Neil Anderson <neil(at)postgrescompare(dot)com> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #14900: MView not null constraint |
Date: | 2017-11-13 17:10:26 |
Message-ID: | 91e087fe-0a09-722a-97b5-919baf524b3c@postgrescompare.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On 2017-11-12 12:12 PM, Tom Lane wrote:
> neil(at)postgrescompare(dot)com writes:
>> This is probably not a bug
>
> Nope, it isn't.
>
>> If it's not a bug should postgres support
>> ALTER MATERIALIZED VIEW ALTER COLUMN column SET NOT NULL syntax?
>
> Doesn't seem like a great idea to me. What's supposed to happen
> if a view update would result in a violation of the constraint?
> It's way too late to undo whatever change of the underlying data
> caused that, so it seems like the only possible answer is for
> REFRESHes to fail, resulting in the view getting more and more
> out of date until and unless something manual is done to resolve
> the problem. I can't see that that's a useful behavior to have.
>
> regards, tom lane
>
>
Makes sense. Seems like the scaffolding tool's problem and in fact they
do have a way to declare it non-nullable via comments now
https://github.com/gajus/postloader#handling-non-nullable-columns-in-materialized-views
Thanks for the info!
--
Neil Anderson
neil(at)postgrescompare(dot)com
http://www.postgrescompare.com
Attachment | Content-Type | Size |
---|---|---|
neil.vcf | text/x-vcard | 165 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2017-11-14 01:08:29 | Re: [BUGS] BUG #14897: Segfault on statitics SQL request |
Previous Message | Dmitry Dolgov | 2017-11-13 16:35:45 | Re: [BUGS] BUG #14897: Segfault on statitics SQL request |