[MASSMAIL]Materialized views and check constraints - Mailing list pgsql-hackers

From ZeroImpl@gmail.com
Subject [MASSMAIL]Materialized views and check constraints
Date
Msg-id CAOcaaC6_7QqF42E_jt74HJydh6ub8ooMw7+OFzBuvubioeWSXg@mail.gmail.com
Whole thread Raw
List pgsql-hackers
Hi,

Is there any way to add check constraints to a materialized view, or plans to add this feature in the future?

Attempting to use "ALTER TABLE tablename ADD CHECK(...)" or "ALTER MATERIALIZED VIEW" result in error:

ERROR:  "tablename" is not a table or foreign table

Check constraints are used by the optimizer, eg for partition removal, so this would be a useful feature to me.

--
Daniel

pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: [MASSMAIL]CSN snapshots in hot standby
Next
From: Nathan Bossart
Date:
Subject: Re: Popcount optimization using AVX512