pgsql: Fix self-referencing foreign keys with partitioned tables

2022-10-07 Thread Alvaro Herrera
Fix self-referencing foreign keys with partitioned tables There are a number of bugs in this area. Two of them are fixed here, namely: 1. get_relation_idx_constraint_oid does not restrict the type of constraint that's returned, so with sufficient bad luck it can return the OID of a foreign

pgsql: Fix self-referencing foreign keys with partitioned tables

2022-10-07 Thread Alvaro Herrera
Fix self-referencing foreign keys with partitioned tables There are a number of bugs in this area. Two of them are fixed here, namely: 1. get_relation_idx_constraint_oid does not restrict the type of constraint that's returned, so with sufficient bad luck it can return the OID of a foreign

pgsql: Fix self-referencing foreign keys with partitioned tables

2022-10-07 Thread Alvaro Herrera
Fix self-referencing foreign keys with partitioned tables There are a number of bugs in this area. Two of them are fixed here, namely: 1. get_relation_idx_constraint_oid does not restrict the type of constraint that's returned, so with sufficient bad luck it can return the OID of a foreign

pgsql: Fix self-referencing foreign keys with partitioned tables

2022-10-07 Thread Alvaro Herrera
Fix self-referencing foreign keys with partitioned tables There are a number of bugs in this area. Two of them are fixed here, namely: 1. get_relation_idx_constraint_oid does not restrict the type of constraint that's returned, so with sufficient bad luck it can return the OID of a foreign

pgsql: Fix self-referencing foreign keys with partitioned tables

2022-10-07 Thread Alvaro Herrera
Fix self-referencing foreign keys with partitioned tables There are a number of bugs in this area. Two of them are fixed here, namely: 1. get_relation_idx_constraint_oid does not restrict the type of constraint that's returned, so with sufficient bad luck it can return the OID of a foreign