foreign data wrapper option manipulation during Create foreign table time? - Mailing list pgsql-hackers

From Demai Ni
Subject foreign data wrapper option manipulation during Create foreign table time?
Date
Msg-id CAOEq2C434D1and0DQOt7qbF5NB1nQnno6B+RUiJGMyMvSJntMw@mail.gmail.com
Whole thread Raw
Responses Re: foreign data wrapper option manipulation during Create foreign table time?
Re: foreign data wrapper option manipulation during Create foreign table time?
List pgsql-hackers
hi, guys,

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.

Demai



pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: group locking: incomplete patch, just for discussion
Next
From: Merlin Moncure
Date:
Subject: Re: lag_until_you_get_something() OVER () window function