Re: fdw_private and (List*) handling in FDW API

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Tomas Vondra" <tv(at)fuzzy(dot)cz>
Cc: "PostgreSQL-development" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: fdw_private and (List*) handling in FDW API
Date: 2013-10-18 15:52:36
Message-ID: 8913.1382111556@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Tomas Vondra" <tv(at)fuzzy(dot)cz> writes:
> 2) Is there any particular reason why PlanForeignModify/BeginForeignModify
> require the fdw_private to be a List*, and not a generic pointer?

That data has to be copiable by copyObject(), which a generic void* is
not. We could perhaps have made it Node* instead, but that would only
work conveniently if there were infrastructure for plugins to create new
first-class Node types; which there isn't. A List is often the easiest
way to transport a few random values from plan time to execution time,
so it seemed best to declare fdw_private that way.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2013-10-18 15:54:49 Re: Review: Patch to compute Max LSN of Data Pages
Previous Message Robert Haas 2013-10-18 15:41:33 Re: psql tab completion for updatable foreign tables