From: Shigeru Hanada Date: Fri, 1 Jul 2011 06:45:20 +0000 (+0900) Subject: Revert "Fix file_fdw to require filename in its validator." X-Git-Url: http://git.postgresql.org/gitweb/review?a=commitdiff_plain;h=7f1261e7e46f132a6655cac104b680fcdb20e02f;p=users%2Fhanada%2Fpostgres.git Revert "Fix file_fdw to require filename in its validator." This reverts commit 8b3612807cb6e2822e20d2c4fbdda5a6841aba59. --- diff --git a/contrib/file_fdw/file_fdw.c b/contrib/file_fdw/file_fdw.c index 57e522fff3..74cff49656 100644 --- a/contrib/file_fdw/file_fdw.c +++ b/contrib/file_fdw/file_fdw.c @@ -215,16 +215,6 @@ file_fdw_validator(PG_FUNCTION_ARGS) */ ProcessCopyOptions(NULL, true, other_options); - /* - * filename is a required option. Validity of other options including - * relative ones have been checked in ProcessCopyOptions(). - * Note: We don't care its value even though it might be empty, because - * COPY comand doesn't. - */ - if (catalog == ForeignTableRelationId && filename == NULL) - ereport(ERROR, - (errmsg("filename is required for file_fdw foreign tables"))); - PG_RETURN_VOID(); } diff --git a/contrib/file_fdw/input/file_fdw.source b/contrib/file_fdw/input/file_fdw.source index 8d6dfa3c4a..9ff7235a12 100644 --- a/contrib/file_fdw/input/file_fdw.source +++ b/contrib/file_fdw/input/file_fdw.source @@ -59,7 +59,6 @@ CREATE FOREIGN TABLE tbl () SERVER file_server OPTIONS (format 'csv', delimiter '); -- ERROR CREATE FOREIGN TABLE tbl () SERVER file_server OPTIONS (format 'csv', null ' '); -- ERROR -CREATE FOREIGN TABLE tbl () SERVER file_server OPTIONS (format 'csv'); -- ERROR CREATE FOREIGN TABLE agg_text ( a int2, diff --git a/contrib/file_fdw/output/file_fdw.source b/contrib/file_fdw/output/file_fdw.source index 6cc6746b0c..2ba36c9368 100644 --- a/contrib/file_fdw/output/file_fdw.source +++ b/contrib/file_fdw/output/file_fdw.source @@ -75,8 +75,6 @@ ERROR: COPY delimiter cannot be newline or carriage return CREATE FOREIGN TABLE tbl () SERVER file_server OPTIONS (format 'csv', null ' '); -- ERROR ERROR: COPY null representation cannot use newline or carriage return -CREATE FOREIGN TABLE tbl () SERVER file_server OPTIONS (format 'csv'); -- ERROR -ERROR: filename is required for file_fdw foreign tables CREATE FOREIGN TABLE agg_text ( a int2, b float4