Re: Constants in the foreighn key constraints

2019-11-25 Thread aleksey ksenzov
Hi team. Thanks for the information. Looks like there're some architectural limitations for such foreign keys. Also thanks for the suggestions on how to make it behaving like I want on current postgres version. On Sat, 23 Nov 2019, 19:11 Tom Lane, wrote: > Adrian Klaver writes: > > Please reply

Re: Constants in the foreighn key constraints

2019-11-24 Thread Mimiko
As a workaround, create a table with only one column and one value = `false` and foreign to it. On 22.11.2019 16:32, aleksey ksenzov wrote: Latest time we faced several issues which wouldn't arise provided we have possibility to use constants in foreign key constraints. brief example where it

Re: Constants in the foreighn key constraints

2019-11-23 Thread Tom Lane
Adrian Klaver writes: > Please reply to list also. > Ccing list. > On 11/22/19 11:36 PM, aleksey ksenzov wrote: >> While I understand I can do everything with triggers/functions, for me >> it looks like a good idea to have possibility to use constants in >> constraints, so it would be very nice

Re: Constants in the foreighn key constraints

2019-11-23 Thread Adrian Klaver
On 11/22/19 11:36 PM, aleksey ksenzov wrote: Please reply to list also. Ccing list. We're already on 12. While I understand I can do everything with triggers/functions, for me it looks like a good idea to have possibility to use constants in constraints, so it would be very nice if postgres

Re: Constants in the foreighn key constraints

2019-11-22 Thread Adrian Klaver
On 11/22/19 6:32 AM, aleksey ksenzov wrote: Hi team. Latest time we faced several issues which wouldn't arise provided we have possibility to use constants in foreign key constraints. brief example where it would be helpful: table_a ( id uuid, parent_id uuid, is_deleted boolean ) having possib

Constants in the foreighn key constraints

2019-11-22 Thread aleksey ksenzov
Hi team. Latest time we faced several issues which wouldn't arise provided we have possibility to use constants in foreign key constraints. brief example where it would be helpful: table_a ( id uuid, parent_id uuid, is_deleted boolean ) having possibility of FK (parent_id, false) to (id, is_delete