Re: Create a Foreign Table for PostgreSQL CSV Logs

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: Олег Самойлов <splarv(at)ya(dot)ru>, Pg Docs <pgsql-docs(at)lists(dot)postgresql(dot)org>
Subject: Re: Create a Foreign Table for PostgreSQL CSV Logs
Date: 2020-08-24 15:07:25
Message-ID: 20200824150725.GJ26781@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

On Mon, Aug 24, 2020 at 07:40:49AM -0700, David G. Johnston wrote:
> On Mon, Aug 24, 2020 at 6:17 AM Олег Самойлов <splarv(at)ya(dot)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(at)momjian(dot)us> https://momjian.us
EnterpriseDB https://enterprisedb.com

The usefulness of a cup is in its emptiness, Bruce Lee

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Pavel Stehule 2020-08-24 15:24:19 Re: Procedures
Previous Message Bruce Momjian 2020-08-24 15:00:56 Re: Procedures