From: Shigeru Hanada Date: Fri, 1 Jul 2011 06:45:25 +0000 (+0900) Subject: Revert "Refactor requirement check of file_fdw." X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=4cdc6ac2afefb124f3b4e378ff8f3ba7e915fa0d;p=users%2Fhanada%2Fpostgres.git Revert "Refactor requirement check of file_fdw." This reverts commit 061e6f039beebc1d9527b35e210ffaf8bce874ed. --- diff --git a/contrib/file_fdw/file_fdw.c b/contrib/file_fdw/file_fdw.c index 74cff49656..466c015107 100644 --- a/contrib/file_fdw/file_fdw.c +++ b/contrib/file_fdw/file_fdw.c @@ -286,6 +286,10 @@ fileGetOptions(Oid foreigntableid, } prev = lc; } + if (*filename == NULL) + ereport(ERROR, + (errcode(ERRCODE_FDW_UNABLE_TO_CREATE_REPLY), + errmsg("filename is required for file_fdw foreign tables"))); *other_options = options; } @@ -304,10 +308,6 @@ filePlanForeignScan(Oid foreigntableid, /* Fetch options --- we only need filename at this point */ fileGetOptions(foreigntableid, &filename, &options); - if (filename == NULL) - ereport(ERROR, - (errcode(ERRCODE_FDW_UNABLE_TO_CREATE_REPLY), - errmsg("filename is required for file_fdw foreign tables"))); /* Construct FdwPlan with cost estimates */ fdwplan = makeNode(FdwPlan);