Database Foreign Key Deferrable

Hi,

When using a postgres database connection and using the modify on a foreign key constraint, the deferrable setting seems to be incorrect. The popup inside IntelliJ shows 'not deferrable' while PGAdmin3 says deferrable, initially deferred. This might be a bug? Anyone else having this issue?

Kind Regards.

1
5 comments

Hello Jan,

Could you please attach the actual DDL for the table? Also please post results from Copy DDL action for this table from IDEA. Thanks.

0
Avatar
Permanently deleted user

DDL used to create the table:


CREATE TABLE testdeferrable
(
id numeric(19,0) NOT NULL,
version numeric(19,0) NOT NULL,
foreign_key_column numeric(19,0) NOT NULL,
CONSTRAINT pk_id PRIMARY KEY (id),
CONSTRAINT fk_foreign_key_column FOREIGN KEY (foreign_key_column)
REFERENCES party (id) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE NO ACTION DEFERRABLE INITIALLY DEFERRED
)

DDL generated by IDEA:

CREATE TABLE testdeferrable
(
id NUMERIC(19) PRIMARY KEY NOT NULL,
version NUMERIC(19) NOT NULL,
foreign_key_column NUMERIC(19) NOT NULL,
CONSTRAINT fk_foreign_key_column FOREIGN KEY (foreign_key_column) REFERENCES party (id)
);

0
Avatar
Permanently deleted user

Just tried the EAP version, but still the same result. 

0
Avatar
Permanently deleted user

I've got the same issue! it's so annoying!

My workaround is to add the connections via PgAdmin and then reconnect to the database in DataGrid.

0

Please sign in to leave a comment.