Re: CREATE FOREGIN TABLE LACUNA - Mailing list pgsql-hackers

From Etsuro Fujita
Subject Re: CREATE FOREGIN TABLE LACUNA
Date
Msg-id 4F61BB74.6090208@lab.ntt.co.jp
Whole thread Raw
In response to Re: CREATE FOREGIN TABLE LACUNA  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
(2012/03/15 0:29), Tom Lane wrote:
> The posted patch for file_fdw takes the
> approach of silently filtering out rows for which they're not true,
> which is not obviously the right thing either --- quite aside from
> whether that's a sane semantics, it's not going to scale to foreign key
> constraints, and even for simple NOT NULL and CHECK constraints it
> results in a runtime penalty on selects, which is not what people would
> expect from a constraint.

I investigated DB2 a little bit.  In DB2, the user can specify the
VALIDATE_DATA_FILE option as a generic option for an external table
attached to a data file, which specifies if the wrapper verifies that
the data file is sorted.  How about introducing this kind of option to
file_fdw?  It might be better that the default value for the option is
'false', and if the value is set to 'true', then file_fdw verifies NOT
NULL, CHECK, and foreign key constraints.

Best regards,
Etsuro Fujita


pgsql-hackers by date:

Previous
From: Yeb Havinga
Date:
Subject: Re: EquivalenceClasses and subqueries and PlaceHolderVars, oh my
Next
From: Thom Brown
Date:
Subject: Re: Command Triggers, patch v11