Refactor file_fdw with adding prefix "file" to FdwRoutine functions.
authorShigeru Hanada <[email protected]>
Thu, 11 Nov 2010 04:44:25 +0000 (13:44 +0900)
committerShigeru Hanada <[email protected]>
Thu, 11 Nov 2010 04:44:25 +0000 (13:44 +0900)
src/backend/foreign/file_fdw.c

index 852a49e88f67155a963b8f24bbd24cf7f7b4d168..8cdb0906523da46e54c394e2cb22e623904a43fa 100644 (file)
@@ -67,11 +67,11 @@ extern Datum file_fdw_handler(PG_FUNCTION_ARGS);
 /*
  * FDW routines
  */
-static void BeginScan(ForeignScanState *scanstate);
-static void Iterate(ForeignScanState *scanstate);
-static void Close(ForeignScanState *scanstate);
-static void ReOpen(ForeignScanState *scanstate);
-static void EstimateCosts(ForeignPath *path, PlannerInfo *root, RelOptInfo *baserel);
+static void fileBeginScan(ForeignScanState *scanstate);
+static void fileIterate(ForeignScanState *scanstate);
+static void fileClose(ForeignScanState *scanstate);
+static void fileReOpen(ForeignScanState *scanstate);
+static void fileEstimateCosts(ForeignPath *path, PlannerInfo *root, RelOptInfo *baserel);
 
 /*
  * Check if the provided option is one of valid options.
@@ -249,12 +249,12 @@ file_fdw_handler(PG_FUNCTION_ARGS)
    {
        NULL,               /* ConnectServer */
        NULL,               /* FreeFSConnection */
-       EstimateCosts,
+       fileEstimateCosts,
        NULL,               /* Open */
-       BeginScan,
-       Iterate,
-       Close,
-       ReOpen,
+       fileBeginScan,
+       fileIterate,
+       fileClose,
+       fileReOpen,
    };
 
    PG_RETURN_POINTER(&file_fdw_routine);
@@ -265,7 +265,7 @@ file_fdw_handler(PG_FUNCTION_ARGS)
  *   - initiate access to the file, but we have nothing to do
  */
 static void
-BeginScan(ForeignScanState *scanstate)
+fileBeginScan(ForeignScanState *scanstate)
 {
    FileState       fstate;
 
@@ -283,7 +283,7 @@ BeginScan(ForeignScanState *scanstate)
  *   - create HeapTuple from the record in the file.
  */
 static void
-Iterate(ForeignScanState *scanstate)
+fileIterate(ForeignScanState *scanstate)
 {
    FileState       fstate = (FileState) scanstate->reply;
    TupleTableSlot *slot = scanstate->ss.ss_ScanTupleSlot;
@@ -312,7 +312,7 @@ Iterate(ForeignScanState *scanstate)
  * Finish scanning foreign table and dispose objects used for this scan.
  */
 static void
-Close(ForeignScanState *scanstate)
+fileClose(ForeignScanState *scanstate)
 {
    FileState       fstate = (FileState) scanstate->reply;
 
@@ -325,7 +325,7 @@ Close(ForeignScanState *scanstate)
  * Execute query with new parameter.
  */
 static void
-ReOpen(ForeignScanState *scanstate)
+fileReOpen(ForeignScanState *scanstate)
 {
    FileState       fstate = (FileState) scanstate->reply;
 
@@ -340,7 +340,7 @@ ReOpen(ForeignScanState *scanstate)
  * Estimate costs of scanning on a foreign table.
  */
 static void
-EstimateCosts(ForeignPath *path, PlannerInfo *root, RelOptInfo *baserel)
+fileEstimateCosts(ForeignPath *path, PlannerInfo *root, RelOptInfo *baserel)
 {
    RangeTblEntry  *rte;
    ForeignTable   *table;