Re: [HACKERS] validating foreign tables

2011-02-21 Thread Pavel Stehule
2011/2/22 Tom Lane : > Andrew Dunstan writes: >> On 02/21/2011 08:59 PM, Itagaki Takahiro wrote: >>> I think we need to overhaul validators in 9.2 listening to FDW developers' >>> opinions anyway. > >> Ok, I guess. It just seems to me like it will be harder to extend the >> API later than now, so

Re: [HACKERS] validating foreign tables

2011-02-21 Thread Tom Lane
Andrew Dunstan writes: > On 02/21/2011 08:59 PM, Itagaki Takahiro wrote: >> I think we need to overhaul validators in 9.2 listening to FDW developers' >> opinions anyway. > Ok, I guess. It just seems to me like it will be harder to extend the > API later than now, so if we can reasonably foresee

Re: [HACKERS] validating foreign tables

2011-02-21 Thread Tom Lane
Andrew Dunstan writes: > On 02/21/2011 06:56 PM, Tom Lane wrote: >> 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 hy

Re: [HACKERS] validating foreign tables

2011-02-21 Thread Andrew Dunstan
On 02/21/2011 08:59 PM, Itagaki Takahiro wrote: I think we need to overhaul validators in 9.2 listening to FDW developers' opinions anyway. The text array is an example, but there should be many other requirements. Personally, I'd like to have a method to list available options from SQL. We sho

Re: [HACKERS] validating foreign tables

2011-02-21 Thread Itagaki Takahiro
On Tue, Feb 22, 2011 at 10:12, Andrew Dunstan wrote: >>> 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 i

Re: [HACKERS] validating foreign tables

2011-02-21 Thread Andrew Dunstan
On 02/21/2011 06:56 PM, Tom Lane wrote: Andrew Dunstan 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 inf

Re: [HACKERS] validating foreign tables

2011-02-21 Thread Tom Lane
Andrew Dunstan 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