Re: NOT Null constraint on foreign table not working
От | Albe Laurenz |
---|---|
Тема | Re: NOT Null constraint on foreign table not working |
Дата | |
Msg-id | A737B7A37273E048B164557ADEF4A58B17C915E9@ntex2010i.host.magwien.gv.at обсуждение исходный текст |
Ответ на | Re: NOT Null constraint on foreign table not working (Rushabh Lathia <rushabh.lathia@gmail.com>) |
Ответы |
Re: NOT Null constraint on foreign table not working
|
Список | pgsql-hackers |
Rushabh Lathia wrote: > I found constraints on foreign table is very useful for the application when the multiple > user accessing same remote table using fdw and both user want to enforce different > constraint on particular table or different user want to enforce different DEFAULT > expression for the same table column. > > I agree with you that if we want to enforce constraint locally then it should be > FDW's task to do it rather then nodeModifyTable.c. I believe that a column of a foreign table should be NOT NULL only if it is guaranteed that it cannot contain NULL values. Doesn't the planner rely on that? But PostgreSQL cannot guarantee that, that has to happen on the remote side (or in the FDW). I think that it is best that an error for a constraint violation is thrown by the same entity that guarantees that the constraint is respected. So I agree with your last statement. Yours, Laurenz Albe
В списке pgsql-hackers по дате отправления: