Revert "Fix file_fdw to require filename in its validator."
authorShigeru Hanada <shigeru.hanada@gmail.com>
Fri, 1 Jul 2011 06:45:20 +0000 (15:45 +0900)
committerShigeru Hanada <shigeru.hanada@gmail.com>
Fri, 1 Jul 2011 06:45:20 +0000 (15:45 +0900)
This reverts commit 8b3612807cb6e2822e20d2c4fbdda5a6841aba59.

contrib/file_fdw/file_fdw.c
contrib/file_fdw/input/file_fdw.source
contrib/file_fdw/output/file_fdw.source

index 57e522fff37df39420bedee406d7084fd9f960f6..74cff496562445e588b0a400b5353dca2a34a597 100644 (file)
@@ -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();
 }
 
index 8d6dfa3c4ab27a92dc8e237db26217f5deef8d9b..9ff7235a12468f270324419ca65522577a7ca17d 100644 (file)
@@ -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,
index 6cc6746b0ccc1187d4099c2ef72aa077a13d6db0..2ba36c936852d3d66643d23f98854e0da5ae3bca 100644 (file)
@@ -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