NOT NULL violation error handling in file_fdw - Mailing list pgsql-hackers

From Etsuro Fujita
Subject NOT NULL violation error handling in file_fdw
Date
Msg-id 4F5DCE12.60408@lab.ntt.co.jp
Whole thread Raw
Responses Re: NOT NULL violation error handling in file_fdw
List pgsql-hackers
According to the following documentation on IterateForeignScan() in
50.2. Foreign Data Wrapper Callback Routines, I have created a patch to
support the error handling in file_fdw.  Please find attached a patch.

    Note that PostgreSQL's executor doesn't care whether the rows
    returned violate the NOT NULL constraints which were defined
    on the foreign table columns - but the planner does care, and
    may optimize queries incorrectly if NULL values are present
    in a column declared not to contain them. If a NULL value is
    encountered when the user has declared that none should be
    present, it may be appropriate to raise an error (just as you
    would need to do in the case of a data type mismatch).

Best regards,
Etsuro Fujita

Attachment

pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: poll: CHECK TRIGGER?
Next
From: Heikki Linnakangas
Date:
Subject: Re: Bug: walsender and high CPU usage