Foreign Data Wrapper - Mailing list pgsql-hackers

From Big Mike
Subject Foreign Data Wrapper
Date
Msg-id CANEiRNzHazQPgDHePxkj0nskL6sMCO11=4ump6ZW616cP8T58g@mail.gmail.com
Whole thread Raw
Responses Re: Foreign Data Wrapper  (Corey Huinker <corey.huinker@gmail.com>)
List pgsql-hackers
Writing a Foreign Data Wrapper and interested in isolating the WHERE clause to speed up the access of an indexed file on my filesystem. I'm attempting to understand the inner workings of how the data is retrieved so I'm writing code to just handle one case at the moment: WHERE clause on a single column in the foreign 'table'.

SELECT * FROM t WHERE testval = 1

I have this code so far, an implementation of the IterateForeignScan interface.

static TupleTableSlot *
bIterateForeignScan(ForeignScanState *node) {
...
RestrictInfo *rinfo = (RestrictInfo *)node->ss.ps.qual;
...
}

yet am not familiar with what I need to do to pick apart RestrictInfo in order to gather 'testvar', '=', and '1' separately so I can interpret and pass those through to my file parser.

Am I going about this the correct way or is there another path I should follow?

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Inaccurate results from numeric ln(), log(), exp() and pow()
Next
From: Corey Huinker
Date:
Subject: Re: Foreign Data Wrapper