Re: [HACKERS] Proposal: Create index on foreign table

2012-03-22 Thread Etsuro Fujita
(2012/03/22 9:24), Tom Lane wrote: > What's at stake in the current discussion is whether it would be > advantageous to an FDW if we were to store some information about > remote indexes in the local catalogs. It would still be the FDW's > responsibility, and nobody else's, to make use of that inf

Re: [HACKERS] Proposal: Create index on foreign table

2012-03-21 Thread Tom Lane
Greg Stark writes: > On Wed, Mar 21, 2012 at 2:22 PM, Tom Lane wrote: >> Well, above Etsuro-san is proposing the other case, ie a Postgres index >> definition for an index *not* stored in the database. But frankly >> I think both ideas are pretty bad. There's no reason to expect that >> Postgre

Re: [HACKERS] Proposal: Create index on foreign table

2012-03-21 Thread Greg Stark
On Wed, Mar 21, 2012 at 2:22 PM, Tom Lane wrote: > Well, above Etsuro-san is proposing the other case, ie a Postgres index > definition for an index *not* stored in the database.  But frankly > I think both ideas are pretty bad.  There's no reason to expect that > Postgres' model of an index will

Re: [HACKERS] Proposal: Create index on foreign table

2012-03-21 Thread Tom Lane
Robert Haas writes: > On Wed, Mar 21, 2012 at 4:47 AM, Etsuro Fujita > wrote: >> I did an investigation on DB2 a little bit. DB2 uses the CREATE INDEX >> SPECIFICATION ONLY statement to define the properties of a remote index. >> >>CREATE INDEX index_name ON foreintable_name >>(column_n

Re: [HACKERS] Proposal: Create index on foreign table

2012-03-21 Thread Robert Haas
On Wed, Mar 21, 2012 at 4:47 AM, Etsuro Fujita wrote: > I did an investigation on DB2 a little bit.  DB2 uses the CREATE INDEX > SPECIFICATION ONLY statement to define the properties of a remote index. > >    CREATE INDEX index_name ON foreintable_name >    (column_name) SPECIFICATION ONLY > > How

Re: [HACKERS] Proposal: Create index on foreign table

2012-03-21 Thread Etsuro Fujita
(2012/03/21 4:39), Robert Haas wrote: On Fri, Mar 16, 2012 at 4:44 AM, Etsuro Fujita wrote: For a flat file, CREATE INDEX constructs an index in the same way as an index for a regular table. It seems really weird to have the data half inside the database and half outside of it like this.

Re: [HACKERS] Proposal: Create index on foreign table

2012-03-20 Thread Robert Haas
On Fri, Mar 16, 2012 at 4:44 AM, Etsuro Fujita wrote: > I have a plan to support 'Create index on foreign table' for 9.3.  Here > is my plan. > > The index creation is supported for a flat file such as CSV and a remote > table on a RDB e.g., Postgres using CREATE INDEX.  (I thought using a > new s

Re: [HACKERS] Proposal: Create index on foreign table

2012-03-18 Thread Etsuro Fujita
(2012/03/17 2:07), David Fetter wrote: On Fri, Mar 16, 2012 at 11:58:29AM +0200, Heikki Linnakangas wrote: On 16.03.2012 10:44, Etsuro Fujita wrote: For a flat file, CREATE INDEX constructs an index in the same way as an index for a regular table. For starters, how would you keep the index

Re: [HACKERS] Proposal: Create index on foreign table

2012-03-18 Thread Etsuro Fujita
(2012/03/16 22:51), Shigeru Hanada wrote: 2012/3/16 Etsuro Fujita: The index creation is supported for a flat file such as CSV and a remote table on a RDB e.g., Postgres using CREATE INDEX. IMHO CREATE INDEX for foreign tables should have general design, not specific to some kind of FDWs.

Re: [HACKERS] Proposal: Create index on foreign table

2012-03-16 Thread David Fetter
On Fri, Mar 16, 2012 at 11:58:29AM +0200, Heikki Linnakangas wrote: > On 16.03.2012 10:44, Etsuro Fujita wrote: > > I have a plan to support 'Create index on foreign table' for 9.3. > > Here is my plan. > > > > The index creation is supported for a flat file such as CSV and a As others, I don't s

Re: [HACKERS] Proposal: Create index on foreign table

2012-03-16 Thread Shigeru Hanada
2012/3/16 Etsuro Fujita : > I have a plan to support 'Create index on foreign table' for 9.3.  Here > is my plan. Very interesting idea, but... > The index creation is supported for a flat file such as CSV and a remote > table on a RDB e.g., Postgres using CREATE INDEX. Why do you limit the targ

Re: [HACKERS] Proposal: Create index on foreign table

2012-03-16 Thread Etsuro Fujita
(2012/03/16 18:58), Heikki Linnakangas wrote: > On 16.03.2012 10:44, Etsuro Fujita wrote: >> I have a plan to support 'Create index on foreign table' for 9.3. Here >> is my plan. >> >> The index creation is supported for a flat file such as CSV and a remote >> table on a RDB e.g., Postgres using C

Re: [HACKERS] Proposal: Create index on foreign table

2012-03-16 Thread Heikki Linnakangas
On 16.03.2012 10:44, Etsuro Fujita wrote: > I have a plan to support 'Create index on foreign table' for 9.3. Here > is my plan. > > The index creation is supported for a flat file such as CSV and a remote > table on a RDB e.g., Postgres using CREATE INDEX. (I thought using a > new statement, CR

[HACKERS] Proposal: Create index on foreign table

2012-03-16 Thread Etsuro Fujita
I have a plan to support 'Create index on foreign table' for 9.3. Here is my plan. The index creation is supported for a flat file such as CSV and a remote table on a RDB e.g., Postgres using CREATE INDEX. (I thought using a new statement, CREATE FOREIGN INDEX, at first, but I think that CREATE