Re: [HACKERS] WIP patch: add (PRE|POST)PROCESSOR options to COPY

2012-09-18 Thread Craig Ringer
On 09/13/2012 10:25 PM, Tom Lane wrote: I think it would be a lot better if this were designed so that the processor programs executed on client side. Which would probably make it not a COPY patch at all, but something in psql. Either that, or allow the pre- and post- processors to be

[HACKERS] Invalid optimization of VOLATILE function in WHERE clause?

2012-09-18 Thread Florian Schoppmann
Hi all, In PostgreSQL 9.1 and 9.2 (possibly also in earlier versions), the query --8-- WITH source AS ( SELECT i FROM generate_series(1,10) AS i ) SELECT i FROM source, ( SELECT count(*) AS _n FROM source ) AS _stats WHERE random() 5::DOUBLE

Re: [HACKERS] WIP patch: add (PRE|POST)PROCESSOR options to COPY

2012-09-18 Thread Etsuro Fujita
From: Craig Ringer [mailto:ring...@ringerc.id.au] On 09/13/2012 10:25 PM, Tom Lane wrote: I think it would be a lot better if this were designed so that the processor programs executed on client side. Which would probably make it not a COPY patch at all, but something in psql. Maybe my

Re: [HACKERS] [PATCH]Tablesample Submission

2012-09-18 Thread Hitoshi Harada
On Tue, Aug 21, 2012 at 8:08 AM, Qi Huang huangq...@outlook.com wrote: Please add your patch here: https://commitfest.postgresql.org/action/commitfest_view/open -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company Hi, Robert I added it under

Re: [HACKERS] [BUGS] BUG #7534: walreceiver takes long time to detect n/w breakdown

2012-09-18 Thread Fujii Masao
On Mon, Sep 17, 2012 at 4:03 PM, Amit Kapila amit.kap...@huawei.com wrote: To define the behavior correctly, according to me there are 2 options now: Approach-1 : Document that both(sender and receiver) the timeout parameters should be greater than wal_receiver_status_interval. If both are

Re: [HACKERS] [BUGS] BUG #7534: walreceiver takes long time to detect n/w breakdown

2012-09-18 Thread Amit Kapila
On Tuesday, September 18, 2012 6:03 PM Fujii Masao wrote: On Mon, Sep 17, 2012 at 4:03 PM, Amit Kapila amit.kap...@huawei.com wrote: To define the behavior correctly, according to me there are 2 options now: Approach-1 : Document that both(sender and receiver) the timeout parameters should be

Re: [HACKERS] Proof of concept: auto updatable views [Review of Patch]

2012-09-18 Thread Amit kapila
On 31 August 2012 07:59, Dean Rasheed dean(dot)a(dot)rasheed(at)gmail(dot)com wrote: On 30 August 2012 20:05, Robert Haas robertmhaas(at)gmail(dot)com wrote: On Sun, Aug 12, 2012 at 5:14 PM, Dean Rasheed dean(dot)a(dot)rasheed(at)gmail(dot)com wrote: Here's an updated patch for the base

Re: [HACKERS] WIP patch: add (PRE|POST)PROCESSOR options to COPY

2012-09-18 Thread Tom Lane
Etsuro Fujita fujita.ets...@lab.ntt.co.jp writes: Maybe my explanation was insufficient. Let me add one thing to my earlier explanation. The submitted patch allows the psql \copy instruction to be executed like: $ echo '/bin/gunzip -c $1' decompress.sh $ chmod +x decompress.sh

Re: [HACKERS] [PATCH] Support for Array ELEMENT Foreign Keys

2012-09-18 Thread Marco Nenciarini
Hi, please find attached the refreshed v1 patch. Regards, Marco -- Marco Nenciarini - 2ndQuadrant Italy PostgreSQL Training, Services and Support marco.nenciar...@2ndquadrant.it | www.2ndQuadrant.it Array-ELEMENT-foreign-key-v1-refreshed.patch.bz2 Description: application/bzip -- Sent

Re: [HACKERS] Confusing EXPLAIN output in case of inherited tables

2012-09-18 Thread Tom Lane
I got interested in this problem again now that we have a user complaint about it (bug #7553). Ashutosh Bapat ashutosh.ba...@enterprisedb.com writes: On Wed, Feb 1, 2012 at 11:01 PM, Robert Haas robertmh...@gmail.com wrote: On Wed, Feb 1, 2012 at 12:23 PM, Tom Lane t...@sss.pgh.pa.us wrote:

Re: [HACKERS] [ADMIN] pg_upgrade from 9.1.3 to 9.2 failed

2012-09-18 Thread Bruce Momjian
On Mon, Sep 17, 2012 at 05:07:23PM -0400, Bruce Momjian wrote: # select * from pg_tables where tablename='sql_features'; schemaname | tablename | tableowner | tablespace | hasindexes | hasrules | hastriggers

Re: [HACKERS] WIP patch: add (PRE|POST)PROCESSOR options to COPY

2012-09-18 Thread Etsuro Fujita
From: Tom Lane [mailto:t...@sss.pgh.pa.us] Etsuro Fujita fujita.ets...@lab.ntt.co.jp writes: Maybe my explanation was insufficient. Let me add one thing to my earlier explanation. The submitted patch allows the psql \copy instruction to be executed like: $ echo '/bin/gunzip -c $1'

Re: [HACKERS] WIP patch: add (PRE|POST)PROCESSOR options to COPY

2012-09-18 Thread Tom Lane
Etsuro Fujita fujita.ets...@lab.ntt.co.jp writes: From: Tom Lane [mailto:t...@sss.pgh.pa.us] I think it would be better to present this as something like \copy foo from '/home/pgsql/decompress.sh /home/pgsql/foo.csv.gz |' with format 'csv' I have a question. I think it would be also better

Re: [HACKERS] WIP patch: add (PRE|POST)PROCESSOR options to COPY

2012-09-18 Thread Tom Lane
I wrote: Etsuro Fujita fujita.ets...@lab.ntt.co.jp writes: I have a question. I think it would be also better to extend the syntax for the SQL COPY command in the same way, ie, COPY foo from '/home/pgsql/decompress.sh /home/pgsql/foo.csv.gz |' with format 'csv' Yeah, sure --- that case