force_not_null option support for file_fdw

Shigeru Hanada <shigeru.hanada@gmail.com>

From: Shigeru Hanada <shigeru.hanada@gmail.com>
To: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2011-08-08T07:14:26Z
Lists: pgsql-hackers

Attachments

Hi,

I propose to support force_not_null option for file_fdw too.

In 9.1 development cycle, file_fdw had been implemented with exported
COPY FROM routines, but only force_not_null option has not been 
supported yet.

Originally, in COPY FROM, force_not_null is specified as a list of
column which is not matched against null-string.  Now per-column FDW
option is available, so I implemented force_not_null options as boolean
value for each column to avoid parsing column list in file_fdw.

True means that the column is not matched against null-string, and it's
equivalent to specify the column's name in force_not_null option of COPY
FROM.  Default value is false.

The patch includes changes for code, document and regression tests.  Any
comments/questions are welcome.

Regards,
-- 
Shigeru Hanada