On 2018-Oct-22, PG Bug reporting form wrote:
> ERROR: constraints on permanent tables may reference only permanent tables
>
> ALTER TABLE bnm.table1
> ADD CONSTRAINT id_fk FOREIGN KEY (bnm_id)
> REFERENCES bnm.table2 (id) MATCH SIMPLE
> ON UPDATE NO ACTION
> ON DELETE NO ACTION;
Is table2 an unlogged table perchance?
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services