common prefix "FileState".
}
/* create FileState and set default settings */
- fstate = MakeFileState(scanstate->ss.ss_currentRelation, options);
+ fstate = FileStateCreate(scanstate->ss.ss_currentRelation, options);
/* pack file information into reply and pass it to subsequent functions */
scanstate->reply = (FdwReply *) fstate;
FileStateGetFilename(fstate));
/* get next tuple from the file */
- tuple = GetNextTuple(fstate, CurrentMemoryContext);
+ tuple = FileStateGetNext(fstate, CurrentMemoryContext);
/*
* If next tuple has been found, store it into the slot. Otherwise,
elog(DEBUG3, "%s called", __FUNCTION__);
- FreeFileState(fstate);
+ FileStateFree(fstate);
}
/*
__FUNCTION__,
FileStateGetFilename(fstate));
- ResetFileState(fstate);
+ FileStateReset(fstate);
}
/*
/*
* These variables are used to reduce overhead of memory allocation in the
- * loop over GetNextTuple().
+ * loop over FileStateGetNext().
*/
Datum *values;
bool *nulls;
/*
- * MakeFileState() makes a FileState for a foreign scan on the relation rel.
+ * FileStateCreate() makes a FileState for a foreign scan on the relation rel.
*/
FileState
-MakeFileState(Relation rel, List *options)
+FileStateCreate(Relation rel, List *options)
{
FileState fstate;
bool format_specified = false;
void
-FreeFileState(FileState fstate)
+FileStateFree(FileState fstate)
{
if (fstate == NULL)
return;
* Read a record from the file and generate HeapTuple.
*/
HeapTuple
-GetNextTuple(FileState fstate, MemoryContext tupleContext)
+FileStateGetNext(FileState fstate, MemoryContext tupleContext)
{
HeapTuple tuple = NULL;
TupleDesc tupDesc = RelationGetDescr(fstate->rel);
}
void
-ResetFileState(FileState fstate)
+FileStateReset(FileState fstate)
{
/* If the file has not been opened, it is virtually reseted already. */
if (fstate->file == NULL)
/*
*
*/
-FileState MakeFileState(Relation rel, List *options);
-HeapTuple GetNextTuple(FileState cstate, MemoryContext tupleContext);
-void ResetFileState(FileState cstate);
-void FreeFileState(FileState cstate);
+FileState FileStateCreate(Relation rel, List *options);
+HeapTuple FileStateGetNext(FileState cstate, MemoryContext tupleContext);
+void FileStateReset(FileState cstate);
+void FileStateFree(FileState cstate);
/*
* FileState access methods