Skip to content

Commit

Permalink
remove some vestigial traces of file_fdw
Browse files Browse the repository at this point in the history
  • Loading branch information
adunstan committed Feb 1, 2022
1 parent 0a2a652 commit 41dcb30
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions file_textarray_fdw.c
Expand Up @@ -53,7 +53,7 @@ struct FileFdwOption
};

/*
* Valid options for file_fdw.
* Valid options for file_textarray_fdw.
* These options are based on the options for COPY FROM command.
*
* Note: If you are adding new option for user mapping, you need to modify
Expand Down Expand Up @@ -204,7 +204,7 @@ file_textarray_fdw_handler(PG_FUNCTION_ARGS)

/*
* Validate the generic options given to a FOREIGN DATA WRAPPER, SERVER,
* USER MAPPING or FOREIGN TABLE that uses file_fdw.
* USER MAPPING or FOREIGN TABLE that uses file_textarray_fdw.
*
* Raise an ERROR if the option or its value is considered invalid.
*/
Expand All @@ -218,7 +218,7 @@ file_textarray_fdw_validator(PG_FUNCTION_ARGS)
ListCell *cell;

/*
* Only superusers are allowed to set options of a file_fdw foreign table.
* Only superusers are allowed to set options of a file_textarray_fdw foreign table.
* This is because we don't want non-superusers to be able to
* control which file gets read or which program gets executed
*
Expand All @@ -233,10 +233,10 @@ file_textarray_fdw_validator(PG_FUNCTION_ARGS)
if (catalog == ForeignTableRelationId && !superuser())
ereport(ERROR,
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
errmsg("only superuser can change options of a file_fdw foreign table")));
errmsg("only superuser can change options of a file_textarray_fdw foreign table")));

/*
* Check that only options supported by file_fdw, and allowed for the
* Check that only options supported by file_textarray_fdw, and allowed for the
* current object type, are given.
*/
foreach(cell, options_list)
Expand Down Expand Up @@ -296,7 +296,7 @@ file_textarray_fdw_validator(PG_FUNCTION_ARGS)
if (catalog == ForeignTableRelationId && filename == NULL)
ereport(ERROR,
(errcode(ERRCODE_FDW_DYNAMIC_PARAMETER_VALUE_NEEDED),
errmsg("either filename or program is required for file_fdw foreign tables")));
errmsg("either filename or program is required for file_textarray_fdw foreign tables")));

PG_RETURN_VOID();
}
Expand All @@ -319,7 +319,7 @@ is_valid_option(const char *option, Oid context)
}

/*
* Fetch the options for a file_fdw foreign table.
* Fetch the options for a file_textarray_fdw foreign table.
*
* We have to separate out filename/program from the other options because
* they must not appear in the options list passed to the core COPY code.
Expand All @@ -337,7 +337,7 @@ fileGetOptions(Oid foreigntableid,

/*
* Extract options from FDW objects. We ignore user mappings because
* file_fdw doesn't have any options that can be specified there.
* file_textarray_fdw doesn't have any options that can be specified there.
*
* (XXX Actually, given the current contents of valid_options[], there's
* no point in examining anything except the foreign table's own options.
Expand Down Expand Up @@ -380,7 +380,7 @@ fileGetOptions(Oid foreigntableid,
if (*filename == NULL)
ereport(ERROR,
(errcode(ERRCODE_FDW_UNABLE_TO_CREATE_REPLY),
errmsg("either filename or program is required for file_fdw foreign tables")));
errmsg("either filename or program is required for file_textarray_fdw foreign tables")));
*other_options = options;
}

Expand Down Expand Up @@ -926,7 +926,7 @@ file_acquire_sample_rows(Relation onerel, int elevel,
* rows from the file with Copy routines.
*/
tupcontext = AllocSetContextCreate(CurrentMemoryContext,
"file_fdw temporary context",
"file_textarray_fdw temporary context",
ALLOCSET_DEFAULT_SIZES);

/* Prepare for sampling rows */
Expand Down

0 comments on commit 41dcb30

Please sign in to comment.