From: Bruce Momjian <bruce@momjian.us>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: Олег Самойлов <splarv@ya.ru>
Cc: Pg Docs <pgsql-docs@lists.postgresql.org>
Subject: Re: Create a Foreign Table for PostgreSQL CSV Logs
Date: Mon, 24 Aug 2020 11:07:25 -0400
Message-ID: <20200824150725.GJ26781@momjian.us> (raw)
In-Reply-To: <CAKFQuwY=pgJLDfcmy6T0_mjL0RGcZQFFALKM=_q9YkfAhmiVcA@mail.gmail.com>
References: <159800192078.2886.10431506404995508950@wrigleys.postgresql.org>
<20200821215807.GE13363@momjian.us>
<CAKFQuwai3Roof2=DNBhfzn-6mksiZHU1hJwPn3XGnaA8jKcbmw@mail.gmail.com>
<20200822175156.GG26781@momjian.us>
<CAKFQuwasNtx0+0nWxsb-mVncHsWfAnPZHO0OR_AB_4aEhTTdfA@mail.gmail.com>
<F1235CD0-B7B4-4624-885C-EF02BFE7E177@ya.ru>
<CAKFQuwY=pgJLDfcmy6T0_mjL0RGcZQFFALKM=_q9YkfAhmiVcA@mail.gmail.com>
On Mon, Aug 24, 2020 at 07:40:49AM -0700, David G. Johnston wrote:
> 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.
I feel constraints are going to lose focus of what we are trying to
show. Do the constraints actually do anything on a foreign table? If
not, we would have to mention that here too, which might be fine.
--
Bruce Momjian <bruce@momjian.us> https://momjian.us
EnterpriseDB https://enterprisedb.com
The usefulness of a cup is in its emptiness, Bruce Lee
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-docs@postgresql.org
Cc: bruce@momjian.us, david.g.johnston@gmail.com, splarv@ya.ru, pgsql-docs@lists.postgresql.org
Subject: Re: Create a Foreign Table for PostgreSQL CSV Logs
In-Reply-To: <20200824150725.GJ26781@momjian.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox