Skip site navigation (1) Skip section navigation (2)

Re: FDW state from plan time

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Dave Page <dpage(at)pgadmin(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: FDW state from plan time
Date: 2011-04-03 18:05:59
Message-ID: 4D98B707.4060501@enterprisedb.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On 03.04.2011 19:38, Tom Lane wrote:
> Dave Page<dpage(at)pgadmin(dot)org>  writes:
>> I can't help thinking I must be missing something obvious here, but is
>> there any way to persist some data from PlanForeignScan to at least
>> BeginForeignScan in an FDW? I'm aware of fdwplan->fdw_private, but at
>> that needs to be copyObject compatible, it's not much use to me.

If you have to, you can encapsulate arbitrary data in a bytea const.

> Or you could use a hash of some other identifying information (perhaps
> the OID of the foreign server would be sufficient ID for a connection?).

Foreign server + user id, probably. That's what I would recommend in 
this case.

-- 
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com

In response to

Responses

pgsql-hackers by date

Next:From: Robert HaasDate: 2011-04-03 22:33:03
Subject: Re: GUC assign hooks (was Re: wal_buffers = -1 and SIGHUP)
Previous:From: Tom LaneDate: 2011-04-03 17:26:11
Subject: GUC assign hooks (was Re: wal_buffers = -1 and SIGHUP)

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group