Re: [HACKERS] WIP Patch: Selective binary conversion of CSV file foreign tables

2012-05-10 Thread Etsuro Fujita
-Original Message- From: Robert Haas [mailto:robertmh...@gmail.com] Sent: Friday, May 11, 2012 1:36 AM To: Etsuro Fujita Cc: pgsql-hackers@postgresql.org Subject: Re: [HACKERS] WIP Patch: Selective binary conversion of CSV file foreign tables On Tue, May 8, 2012 at 7:26 AM

[HACKERS] WIP Patch: Selective binary conversion of CSV file foreign tables

2012-05-08 Thread Etsuro Fujita
column data types as well as all kinds of constraints. I appreciate your comments. Best regards, Etsuro Fujita [1] http://homepages.cwi.nl/~idreos/NoDBsigmod2012.pdf [2] https://commitfest.postgresql.org/action/patch_view?id=822 file_fdw_sel_bin_conv_v1.patch Description: Binary data -- Sent via

Re: [HACKERS] WIP Patch: Selective binary conversion of CSV file foreign tables

2012-05-08 Thread Etsuro Fujita
-Original Message- From: David Fetter [mailto:da...@fetter.org] Sent: Wednesday, May 09, 2012 9:25 AM To: Etsuro Fujita Cc: pgsql-hackers@postgresql.org Subject: Re: [HACKERS] WIP Patch: Selective binary conversion of CSV file foreign tables On Tue, May 08, 2012 at 08:26:02PM

Re: [HACKERS] not null validation option in contrib/file_fdw

2012-04-16 Thread Etsuro Fujita
Thank you for the review. -Original Message- From: pgsql-hackers-ow...@postgresql.org [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Andrew Dunstan Sent: Friday, April 13, 2012 9:16 PM To: Shigeru HANADA Cc: Etsuro Fujita; pgsql-hackers@postgresql.org Subject: Re

Re: [HACKERS] not null validation option in contrib/file_fdw

2012-04-16 Thread Etsuro Fujita
I updated the patch. Attached is an updated version of the patch. Changes: * fix a bug in fileGetOptions() * rename the validation option and its code to validate_data_file * clean up Best regards, Etsuro Fujita -Original Message- From: pgsql-hackers-ow...@postgresql.org

Re: [HACKERS] typo fix

2012-04-15 Thread Etsuro Fujita
Thanks! Best regards, Etsuro Fujita -Original Message- From: Peter Eisentraut [mailto:pete...@gmx.net] Sent: Saturday, April 14, 2012 7:07 AM To: Etsuro Fujita Cc: pgsql-hackers@postgresql.org Subject: Re: [HACKERS] typo fix On fre, 2012-04-13 at 17:27 +0900, Etsuro Fujita wrote

[HACKERS] not null validation option in contrib/file_fdw

2012-04-13 Thread Etsuro Fujita
()? I think it is good to just recommend that users do ANALYZE a foreign table after the validation.) For the discussion in [3], I've added a new external function ExecNotNullCheck() and call it from fileIterateForeignScan. Any comments are welcome. Best regards, Etsuro Fujita [1] https

[HACKERS] typo fix

2012-04-13 Thread Etsuro Fujita
This is a little patch to fix a typo in file-fdw.sgml Best regards, Etsuro Fujita file_fdw_typo_fix_20120413.patch Description: Binary data -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql

Re: [HACKERS] [Patch] Fix little typo in a comment

2012-04-12 Thread Etsuro Fujita
From: Tom Lane [mailto:t...@sss.pgh.pa.us] Etsuro Fujita fujita.ets...@lab.ntt.co.jp writes: This is a little patch to fix a typo in contrib/file_fdw. I think that comment is fine as-is. OK, thanks. Best regards, Etsuro Fujita regards, tom lane -- Sent via

[HACKERS] [Patch] Fix little typo in a comment

2012-04-11 Thread Etsuro Fujita
This is a little patch to fix a typo in contrib/file_fdw. Best regards, Etsuro Fujita file_fdw_typo_fix.patch Description: Binary data -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql

Re: [HACKERS] WIP: Collecting statistics on CSV file data

2012-04-08 Thread Etsuro Fujita
Thanks! Best regards, Etsuro Fujita -Original Message- From: pgsql-hackers-ow...@postgresql.org [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Tom Lane Sent: Saturday, April 07, 2012 4:20 AM To: Shigeru HANADA Cc: Etsuro Fujita; pgsql-hackers@postgresql.org Subject: Re

Re: [HACKERS] pgsql_fdw, FDW for PostgreSQL server

2012-04-05 Thread Etsuro Fujita
At 22:11 12/03/28 +0900, Shigeru HANADA wrote: ANALYZE support for foreign tables is proposed by Fujita-san in current CF, so I'd like to push it. I updated the patch to the latest HEAD. Please find attached a patch. Best regards, Etsuro Fujita postgresql-analyze-v7.patch Description

Re: [HACKERS] pgsql_fdw, FDW for PostgreSQL server

2012-04-05 Thread Etsuro Fujita
Sorry, I sent this email without noticing Hanada-san' earlier email. So, please look at Hanada-san's post. Best regards, Etsuro Fujita -Original Message- From: pgsql-hackers-ow...@postgresql.org [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Etsuro Fujita Sent: Thursday, April

Re: [HACKERS] WIP: Collecting statistics on CSV file data

2012-04-05 Thread Etsuro Fujita
Thanks, Hanada-san! Best regards, Etsuro Fujita -Original Message- From: Shigeru HANADA [mailto:shigeru.han...@gmail.com] Sent: Friday, April 06, 2012 11:41 AM To: Etsuro Fujita Cc: pgsql-hackers@postgresql.org Subject: Re: [HACKERS] WIP: Collecting statistics on CSV file data (2012/04

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

2012-03-22 Thread Etsuro Fujita
a few of those. OK. I'd like to at first focus on file FDW and Postgres FDW. I'd like to thank everyone who commented on this topic. Thanks! Best regards, Etsuro Fujita -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http

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

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

2012-03-18 Thread Etsuro Fujita
transformation that defines a one-to-one mapping into the TID space. Best regards, Etsuro Fujita -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

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

[HACKERS] Proposal: Create index on foreign table

2012-03-16 Thread Etsuro Fujita
don't have any clear idea to make use of the index information stored in the system catalogs for better query optimization, but I believe that it's useful for the ORDER BY push down and/or nestloop-with-inner-parametrized-scan join optimization. Thoughts? Best regards, Etsuro Fujita -- Sent via

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] CREATE FOREGIN TABLE LACUNA

2012-03-15 Thread Etsuro Fujita
key constraints. Best regards, Etsuro Fujita -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] NOT NULL violation error handling in file_fdw

2012-03-13 Thread Etsuro Fujita
(2012/03/13 15:53), Shigeru HANADA wrote: (2012/03/12 19:21), Etsuro Fujita wrote: According to the following documentation on IterateForeignScan() in 50.2. Foreign Data Wrapper Callback Routines, I have created a patch to support the error handling in file_fdw. Please find attached a patch

Corrected: Re: [HACKERS] pgsql_fdw, FDW for PostgreSQL server

2012-03-12 Thread Etsuro Fujita
(2012/03/12 13:04), Etsuro Fujita wrote: (2012/03/09 23:48), Tom Lane wrote: Etsuro Fujitafujita.ets...@lab.ntt.co.jp writes: 2. IMHO RelOptInfo.fdw_private seems confusing. How about renaming it to e.g., RelOptInfo.fdw_state? Why is that better? It seems just as open to confusion

[HACKERS] NOT NULL violation error handling in file_fdw

2012-03-12 Thread Etsuro Fujita
be present, it may be appropriate to raise an error (just as you would need to do in the case of a data type mismatch). Best regards, Etsuro Fujita *** a/contrib/file_fdw/file_fdw.c --- b/contrib/file_fdw/file_fdw.c *** *** 502,507 fileIterateForeignScan(ForeignScanState

Re: [HACKERS] pgsql_fdw, FDW for PostgreSQL server

2012-03-11 Thread Etsuro Fujita
are relatively far from the ones of fdw_private of Path and Plan. Best regards, Etsuro Fujita -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] pgsql_fdw, FDW for PostgreSQL server

2012-03-09 Thread Etsuro Fujita
RelOptInfo.fdw_private seems confusing. How about renaming it to e.g., RelOptInfo.fdw_state? Attached is a patch for the draft patch. Best regards, Etsuro Fujita *** a/contrib/file_fdw/file_fdw.c --- b/contrib/file_fdw/file_fdw.c *** *** 74,87 static const struct FileFdwOption

Re: [HACKERS] pgsql_fdw, FDW for PostgreSQL server

2012-03-05 Thread Etsuro Fujita
(2012/03/05 18:21), Shigeru Hanada wrote: (2012/02/21 20:25), Etsuro Fujita wrote: Please find attached an updated version of the patch. This v2 patch can be applied on HEAD cleanly. Compile completed with only one expected warning of scan.c, and all regression tests for both core

Re: [HACKERS] pgsql_fdw, FDW for PostgreSQL server

2012-03-05 Thread Etsuro Fujita
(2012/03/05 21:00), Etsuro Fujita wrote: (2012/03/05 18:21), Shigeru Hanada wrote: (2012/02/21 20:25), Etsuro Fujita wrote: Please find attached an updated version of the patch. This v2 patch can be applied on HEAD cleanly. Compile completed with only one expected warning of scan.c, and all

Re: [HACKERS] REASSIGN OWNED lacks support for FDWs

2012-02-23 Thread Etsuro Fujita
, but as far as I know the guiding principle here is that superusers always can do whatever they please. Maybe what you point out is a bug in the behavior (both before and after my patch), but if so, please raise it separately. OK. Thanks. Best regards, Etsuro Fujita -- Sent via pgsql-hackers mailing

Re: [HACKERS] REASSIGN OWNED lacks support for FDWs

2012-02-22 Thread Etsuro Fujita
foreign data wrapper. Best regards, Etsuro Fujita $ psql postgres psql (9.2devel) Type help for help. postgres=# CREATE ROLE reassign_fdw_user LOGIN SUPERUSER; CREATE ROLE postgres=# SET SESSION AUTHORIZATION 'reassign_fdw_user'; SET postgres=# CREATE ROLE regress_test_role; CREATE ROLE postgres

Re: [HACKERS] pgsql_fdw, FDW for PostgreSQL server

2012-02-21 Thread Etsuro Fujita
(2012/02/15 20:50), Etsuro Fujita wrote: (2012/02/14 23:50), Tom Lane wrote: (2012/02/14 17:40), Etsuro Fujita wrote: As discussed at that thread, it would have to change the PlanForeignScan API to let the FDW generate multiple paths and dump them all to add_path instead of returning

Re: [HACKERS] WIP: Collecting statistics on CSV file data

2012-02-16 Thread Etsuro Fujita
Hi Hanada-san, Sorry for the late response. (2012/02/10 22:05), Shigeru Hanada wrote: (2011/12/15 11:30), Etsuro Fujita wrote: (2011/12/14 15:34), Shigeru Hanada wrote: I think this patch could be marked as Ready for committer with some minor fixes. Please find attached a revised patch

Re: [HACKERS] pgsql_fdw, FDW for PostgreSQL server

2012-02-15 Thread Etsuro Fujita
(2012/02/14 23:50), Tom Lane wrote: Shigeru Hanadashigeru.han...@gmail.com writes: (2012/02/14 17:40), Etsuro Fujita wrote: As discussed at that thread, it would have to change the PlanForeignScan API to let the FDW generate multiple paths and dump them all to add_path instead of returning

Re: [HACKERS] pgsql_fdw, FDW for PostgreSQL server

2012-02-14 Thread Etsuro Fujita
(2012/02/14 15:15), Shigeru Hanada wrote: (2012/02/13 20:50), Etsuro Fujita wrote: The patches have been applied, but role-related regression tests failed in my environment. I fixed it in a similar fashion of /src/test/regress/sql/foreign_data.sql. Please find attached a updated patch

Re: [HACKERS] pgsql_fdw, FDW for PostgreSQL server

2012-02-14 Thread Etsuro Fujita
(2012/02/14 19:42), Shigeru Hanada wrote: (2012/02/14 17:40), Etsuro Fujita wrote: As discussed at that thread, it would have to change the PlanForeignScan API to let the FDW generate multiple paths and dump them all to add_path instead

Re: [HACKERS] pgsql_fdw, FDW for PostgreSQL server

2012-02-13 Thread Etsuro Fujita
/regress/sql/foreign_data.sql. Please find attached a updated patch for the regression tests. BTW, What do you think about this? http://archives.postgresql.org/pgsql-hackers/2012-01/msg00229.php Best regards, Etsuro Fujita *** sql/pgsql_fdw.sql.orig 2012-02-13 19:52:08.0 +0900 --- sql

Re: [HACKERS] WIP: Collecting statistics on CSV file data

2011-12-14 Thread Etsuro Fujita
(2011/12/14 15:34), Shigeru Hanada wrote: (2011/12/13 22:00), Etsuro Fujita wrote: Thank you for your effectiveness experiments and proposals for improvements. I updated the patch according to your proposals. Attached is the updated version of the patch. I think this patch could be marked

Re: [HACKERS] WIP: Collecting statistics on CSV file data

2011-12-09 Thread Etsuro Fujita
Hi Hanada-san, I updated the patch. Please find attached a patch. Best regards, Etsuro Fujita (2011/11/18 21:00), Shigeru Hanada wrote: (2011/11/18 16:25), Etsuro Fujita wrote: Thank you for your testing. I updated the patch according to your comments. Attached is the updated version

Re: [HACKERS] pgsql_fdw, FDW for PostgreSQL server

2011-11-28 Thread Etsuro Fujita
(2011/11/28 20:50), Shigeru Hanada wrote: (2011/11/25 17:27), Etsuro Fujita wrote: So, I think it might be better to estimate such costs by pgsql_fdw itself without EXPLAINing on the assumption that a remote postgres server has the same abilities for query

Re: [HACKERS] pgsql_fdw, FDW for PostgreSQL server

2011-11-25 Thread Etsuro Fujita
and widely applicable to the other DBMSs, while it, of course, only works once we have statistics and/or index information for foreign tables. But AFAIK we eventually want to have those, so I'd like to propose to use the proposed approach until that time. Best regards, Etsuro Fujita -- Sent via pgsql

Re: [HACKERS] WIP: Collecting statistics on CSV file data

2011-11-20 Thread Etsuro Fujita
those tuples as dead tuples. This is for the consistency with NOT NULL constrain. (But I don't know why fileIterateForeignScan routine allows such dead tuples. I may have missed something.) Best regards, Etsuro Fujita (2011/11/18 21:00), Shigeru Hanada wrote: (2011/11/18 16:25), Etsuro Fujita

Re: [HACKERS] WIP: Collecting statistics on CSV file data

2011-11-20 Thread Etsuro Fujita
for foreign index scan on CSV file data that I plan to propose in the next CF. So, it is meaningless for now. I'm sorry. I will fix it at the next version of the patch so that they don't have to. Best regards, Etsuro Fujita -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org

Re: [HACKERS] WIP: Collecting statistics on CSV file data

2011-11-17 Thread Etsuro Fujita
(2011/11/07 20:26), Shigeru Hanada wrote: (2011/10/20 18:56), Etsuro Fujita wrote: I revised the patch according to Hanada-san's comments. Attached is the updated version of the patch. Changes: * pull up of logging analyzing foo.bar * new vac_update_relstats always called

Re: [HACKERS] WIP: Collecting statistics on CSV file data

2011-10-19 Thread Etsuro Fujita
of foreign tables... The patch does not analyze on foreign tables automatically. (The issue of auto-analyze on foreign tables has been discussed. Please refer to [1].) [1] http://archives.postgresql.org/pgsql-hackers/2011-09/msg00992.php Best regards, Etsuro Fujita -- Sent via pgsql-hackers

Re: [HACKERS] WIP: Collecting statistics on CSV file data

2011-10-17 Thread Etsuro Fujita
or somewhere in core. - It should be mentioned in a document that foreign tables are not analyzed automatically because they are read-only. OK. I'll revise. Regards, Best regards, Etsuro Fujita -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your

Re: [HACKERS] WIP: Collecting statistics on CSV file data

2011-10-10 Thread Etsuro Fujita
into the virtual index interface from Informix. Thank you for the information. We might want to start a wiki page on this. Yeah, I think it might be better to add information to the SQL/MED wiki page: http://wiki.postgresql.org/wiki/SQL/MED Best regards, Etsuro Fujita -- Sent via pgsql

Re: [HACKERS] WIP: Collecting statistics on CSV file data

2011-10-07 Thread Etsuro Fujita
integer ALTER [COLUMN] column SET ( n_distinct = val ) (n_distinct only) ALTER [COLUMN] column RESET ( n_distinct ) * reflection of the force_not_null info in acquiring sample rows * documentation Best regards, Etsuro Fujita *** a/contrib/file_fdw/file_fdw.c --- b/contrib/file_fdw

Re: [HACKERS] WIP: Collecting statistics on CSV file data

2011-10-07 Thread Etsuro Fujita
that feature for future work. (But this is BTW. I'm interested in developing CREATE FOREIGN INDEX. I've examined whether there are discussions about the design and implementation of it in the archive, but could not find information. If you know anything, please tell me.) Best regards, Etsuro Fujita

[HACKERS] WIP: Collecting statistics on CSV file data

2011-09-12 Thread Etsuro Fujita
) Filter: ((aid = 0) AND (aid = 1)) Foreign File: /home/pgsql/sample_csv_data1.csv Foreign File Size: 54396 Total runtime: 15114.480 ms (13 rows) Best regards, Etsuro Fujita diff -crNB original/postgresql-9.1beta1/contrib/file_fdw/file_fdw.c changed

<    5   6   7   8   9   10