pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #15451: Error adding foriegn key constraint
3+ messages / 3 participants
[nested] [flat]
* BUG #15451: Error adding foriegn key constraint
@ 2018-10-22 19:05 PG Bug reporting form <noreply@postgresql.org>
0 siblings, 2 replies; 3+ messages in thread
From: PG Bug reporting form @ 2018-10-22 19:05 UTC (permalink / raw)
To: pgsql-bugs@lists.postgresql.org; +Cc: harry@harryclarke.me.uk
The following bug has been logged on the website:
Bug reference: 15451
Logged by: Harry Clarke
Email address: harry@harryclarke.me.uk
PostgreSQL version: 10.5
Operating system: Windows Server 2008 R2 standard
Description:
When trying to create a table, or to add a foreign key constraint to a
table, an error (see below) is produced. However, both tables are permanent
tables, and there are no temporary tables that I am aware of.
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;
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: BUG #15451: Error adding foriegn key constraint
@ 2018-10-22 19:12 Andres Freund <andres@anarazel.de>
parent: PG Bug reporting form <noreply@postgresql.org>
1 sibling, 0 replies; 3+ messages in thread
From: Andres Freund @ 2018-10-22 19:12 UTC (permalink / raw)
To: harry@harryclarke.me.uk; pgsql-bugs@lists.postgresql.org
On 2018-10-22 19:05:51 +0000, PG Bug reporting form wrote:
> The following bug has been logged on the website:
>
> Bug reference: 15451
> Logged by: Harry Clarke
> Email address: harry@harryclarke.me.uk
> PostgreSQL version: 10.5
> Operating system: Windows Server 2008 R2 standard
> Description:
>
> When trying to create a table, or to add a foreign key constraint to a
> table, an error (see below) is produced. However, both tables are permanent
> tables, and there are no temporary tables that I am aware of.
>
> ERROR: constraints on permanent tables may reference only permanent tables
Note that unlogged tables are also considered not permanent. Is that it?
Greetings,
Andres Freund
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: BUG #15451: Error adding foriegn key constraint
@ 2018-10-22 19:12 Alvaro Herrera <alvherre@2ndquadrant.com>
parent: PG Bug reporting form <noreply@postgresql.org>
1 sibling, 0 replies; 3+ messages in thread
From: Alvaro Herrera @ 2018-10-22 19:12 UTC (permalink / raw)
To: harry@harryclarke.me.uk; pgsql-bugs@lists.postgresql.org
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
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2018-10-22 19:12 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-10-22 19:05 BUG #15451: Error adding foriegn key constraint PG Bug reporting form <noreply@postgresql.org>
2018-10-22 19:12 ` Andres Freund <andres@anarazel.de>
2018-10-22 19:12 ` Alvaro Herrera <alvherre@2ndquadrant.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox