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

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 fujita.ets...@lab.ntt.co.jp 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

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 fujita.ets...@lab.ntt.co.jp 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)

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

2012-03-21 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Wed, Mar 21, 2012 at 4:47 AM, Etsuro Fujita fujita.ets...@lab.ntt.co.jp 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

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 t...@sss.pgh.pa.us 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

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

2012-03-21 Thread Tom Lane
Greg Stark st...@mit.edu writes: On Wed, Mar 21, 2012 at 2:22 PM, Tom Lane t...@sss.pgh.pa.us 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

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 fujita.ets...@lab.ntt.co.jp 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

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 Fujitafujita.ets...@lab.ntt.co.jp: 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

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

[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

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, CREATE

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 CREATE

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

2012-03-16 Thread Shigeru Hanada
2012/3/16 Etsuro Fujita fujita.ets...@lab.ntt.co.jp: 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.

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 see a