How to get value of 'Param' of the WHERE clause in the FDW?

Поиск
Список
Период
Сортировка
От Dmitry Chichkov
Тема How to get value of 'Param' of the WHERE clause in the FDW?
Дата
Msg-id CADeuJh4Z2a15L0W0dLSHAid+7aMfcwq33vcE9_-bmm9Cpvnx-A@mail.gmail.com
обсуждение исходный текст
Ответы Re: How to get value of 'Param' of the WHERE clause in the FDW?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Please help.... I'm doing a following query to a foreign wrapper:
   FUNCTION fwcall(text) ....   SELECT * FROM fwtable WHERE col=$1....  ;
   ...
   SELECT * from fdwcall('abc123');


I'm looking for a way to get that parameter 'abc123' value in the FDW wrapper code...


It seems like during fdwPlan(..., RelOptInfo *baserel) stage I'm getting  baserel->baserestrictinfo, in which I see a Node *x  of  IsA(x, Param).  But it looks like the value 'abc123' is not yet available in the planning stage, right?   And I don't see how can I get baserestrictinfo in the execution stage or if the 'abc123' value would be there...

Can somebody kick me to the right direction?  Please?

Thanks,
Dmitry

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: upcoming infrastructure changes/OS upgrades on *.postgresql.org
Следующее
От: Fabien COELHO
Дата:
Сообщение: Re: Doubt in pgbench TPS number