Re: Foreign Key error between two partitioned tables

2024-04-19 Thread David Rowley
On Fri, 19 Apr 2024 at 05:48, Michael Corey wrote: > ALTER TABLE ONLY par_log_file > ADD CONSTRAINT plf_pk PRIMARY KEY (par_file_id); > ALTER TABLE par_log_definition > ADD CONSTRAINT pld_fk FOREIGN KEY (par_file_id) REFERENCES > par_log_file(par_file_id); > I receive the following erro

Foreign Key error between two partitioned tables

2024-04-18 Thread Michael Corey
Hello, I receive the following error when creating a foreign key between two partitioned tables. ERROR: there is no unique constraint matching given keys for referenced table "par_log_file" Here is my setup: CREATE TABLE par_log_file ( par_file_id character varying(20) NOT NULL, par_id