Re: validating foreign tables

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: validating foreign tables
Дата
Msg-id 4D630D87.6070102@dunslane.net
обсуждение исходный текст
Ответ на Re: validating foreign tables  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: validating foreign tables  (Itagaki Takahiro <itagaki.takahiro@gmail.com>)
Re: validating foreign tables  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers

On 02/21/2011 06:56 PM, Tom Lane wrote:
> Andrew Dunstan<andrew@dunslane.net>  writes:
>> The API for FDW validators doesn't appear to have any way that the
>> validator function can check that the defined foreign table shape
>> matches the FDW options sanely.
> Huh?  The options ought to be orthogonal to the table column info.
> If they're not, maybe you need to rethink your option definitions.
>
>             

Well, let's take a couple of cases.

1. My old favorite, file as a text array.
2. A hypothetical RSS feed, where the options specify which RSS fields 
we want.

Of course, we could just let these break or give odd results when we run 
a SELECT if the foreign table doesn't match what's expected. file_fdw 
will presumably break if the input file has rows with the wrong number 
of columns, just as COPY does. But there will be cases, like the two 
above, where a sanity check on the table shape could usefully be done at 
validation time as opposed to run time, and it would be nice to be able 
to do such a check.

cheers

andrew


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Snapshot synchronization, again...
Следующее
От: Itagaki Takahiro
Дата:
Сообщение: Re: validating foreign tables