Re: foreign data wrapper option manipulation during Create foreign table time?
От | Demai Ni |
---|---|
Тема | Re: foreign data wrapper option manipulation during Create foreign table time? |
Дата | |
Msg-id | CAOEq2C6OrMmz4KTTWeCb4T2kajUtvLrTM5htoFdkV92+qMJ5zA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: foreign data wrapper option manipulation during Create foreign table time? (Ronan Dunklau <ronan.dunklau@dalibo.com>) |
Ответы |
Re: foreign data wrapper option manipulation during Create foreign table time?
|
Список | pgsql-hackers |
Robert and Ronan,
many thanks for your response. On Wed, Oct 29, 2014 at 10:01 AM, Ronan Dunklau <ronan.dunklau@dalibo.com> wrote:
Le mercredi 29 octobre 2014 12:49:12 Robert Haas a écrit :I would do that during the IMPORT FOREIGN SCHEMA statement. That way, the user> On Tue, Oct 28, 2014 at 5:26 PM, Demai Ni <nidmgg@gmail.com> wrote:
> > I am looking for a couple pointers here about fdw, and how to change the
> > option values during CREATE table time.
> >
> > I am using postgres-xc-1.2.1 right now. For example, it contains file_fdw,
> > whose create-table-stmt looks like:
> > CREATE FOREIGN TABLE t1(....)
> > SERVER file_server
> > OPTIONS(format 'text',filename 'testing.txt');
> >
> > I would like to replace the 'testing.txt' with absolute path like
> > '/user/testor1/testing.txt', and make sure the new value is saved in
> > pg_foreign_table; the file_fdw_validator is used to validate the options,
> > but is there a way to replace the optionValue here? And get the new value
> > stored in pg_foreign_table?
> >
> > Thanks
> >
> > BTW, in my real use case, I am trying to interpret a hdfs file and would
> > need to save some hostname/port information in the option value, which not
> > necessary specified by user.
>
> I don't think there's going to be a clean way to do this. The
> intention of the system is that the user-provided options are simply
> stored, not that the FDW author is going to use the options list to
> store their own bits and pieces.
doesn't have to specify those options: they would be generated at IMPORT time,
and the user could change them later if really needed.
--
Ronan Dunklau
http://dalibo.com - http://dalibo.org
В списке pgsql-hackers по дате отправления: