From: | Demai Ni <nidmgg(at)gmail(dot)com> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: foreign data wrapper option manipulation during Create foreign table time? |
Date: | 2014-10-28 22:07:26 |
Message-ID: | CAOEq2C50y_i=K+w4D4XpA-52XOHy_KsA+hUPiONPk_VuLC7dhQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
hi, Andrew,
thanks for the quick response.
M understanding is that Alter Foreign Table can change the option values by
user. What I need is to change the value programmatic inside foreign data
wrapper code, and hope someone already done so I can learn from the
existing design.
I thought this email list is for developer(ie, who change the code), and
pgsql-general for users. Hence, send to here. If it is wrong place, I will
switch the question over.
Anyway, appreciate the response. And good point on Alter-foreign-table,
probably some logic there I can copy over to create-table....
Demai
On Tue, Oct 28, 2014 at 3:00 PM, Andrew Dunstan <andrew(at)dunslane(dot)net> wrote:
>
> On 10/28/2014 05:26 PM, Demai Ni wrote:
>
>> 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.
>>
>>
>
> This is the wrong list to ask this - it's a usage question that belongs on
> pgsql-general
>
> See the documentation for ALTER FOREIGN TABLE.
>
> cheers
>
> andrew
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2014-10-28 22:54:52 | Re: Directory/File Access Permissions for COPY and Generic File Access Functions |
Previous Message | Andrew Dunstan | 2014-10-28 22:00:14 | Re: foreign data wrapper option manipulation during Create foreign table time? |