On Mon, Aug 24, 2020 at 6:17 AM Олег Самойлов <splarv@ya.ru> wrote:
There must not be constraints at all. Constraints are needed to check incoming data to the table. But here table is read-only for database!
Please don't top-post.
So all your constraints is totally useless. > > could become: > > > > connection_from text check(connection_from ~ '^[^:]+:[0-9]+$) -- the host and > > port of the client, colon-separated
I'll agree that the benefit for adding the constraints to a foreign table are less than for a normal table but it is still not zero. Constraints are also a form of documentation. And also can be used (at least non-null ones) during optimization.