Re: [HACKERS] Review: Non-inheritable check constraints

2011-10-07 Thread Nikhil Sontakke
Hi Alex, Hmmm, your patch checks for a constraint being only via: !recurse !recursing I hope that is good enough to conclusively conclude that the constraint is 'only'. This check was not too readable in the existing code for me anyways ;). If we check at the grammar

Re: [HACKERS] Review: Non-inheritable check constraints

2011-10-07 Thread Alex Hunsaker
On Fri, Oct 7, 2011 at 00:28, Nikhil Sontakke nikkh...@gmail.com wrote: Hi Alex, So with it all spelled out now I see the constraint must be added to child tables too check is dead code. Thanks the above step-wise explanation helps. But AFAICS, the default inhOpt value can be governed by

Re: [HACKERS] libpq, PQdescribePrepared - PQftype, PQfmod, no PQnullable

2011-10-07 Thread Peter Eisentraut
On tor, 2011-10-06 at 20:15 -0400, Alex Goncharov wrote: P.S. And on the odd chance that somebody thinks that this functionality would be possible and helpful to add to libpq, and the problem is in the lack of human resources: I would be more then happy to dig into some

GiST for range types (was Re: [HACKERS] Range Types - typo + NULL string constructor)

2011-10-07 Thread Alexander Korotkov
On Fri, Oct 7, 2011 at 7:41 AM, Jeff Davis pg...@j-davis.com wrote: I'd prefer to include it in the initial patch. If the current GiST code is going to be replaced, then there's not much sense reviewing/testing it. You may need to consider unbounded and empty ranges specially. I made an

[HACKERS] [OT?] Time-zone database down [was: Re: timezone buglet?]

2011-10-07 Thread Andrea Suisani
On 10/05/2011 07:37 AM, Tom Lane wrote: davegda...@sonic.net writes: Postgresql 9.0.4 has the timezone: America/Blanc-Sablon However other sources seem to spell this with an underscore instead of dash: America/Blanc_Sablon I don't know what other sources you're consulting, but

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

2011-10-07 Thread Etsuro Fujita
Hi Hanada-san, I'm very sorry for late reply. (2011/09/20 18:49), Shigeru Hanada wrote: I took a look at the patch, and found that it couldn't be applied cleanly against HEAD. Please rebase your patch against current HEAD of master branch, rather than 9.1beta1. The wiki pages below would

[HACKERS] Why does WAL_DEBUG macro need to be defined by default?

2011-10-07 Thread Fujii Masao
Hi, I found that by default WAL_DEBUG macro has been defined in 9.2dev and 9.1. I'm very surprised at this. Why does WAL_DEBUG need to be defined by default? The performance overhead introduced by WAL_DEBUG is really vanishingly low? WAL_DEBUG was defined in the following commit:

Re: [HACKERS] [REVIEW] Patch for cursor calling with named parameters

2011-10-07 Thread Yeb Havinga
On 2011-10-06 16:04, Royce Ausburn wrote: Initial Review for patch: http://archives.postgresql.org/pgsql-hackers/2011-09/msg00744.php Hello Royce, Thank you for your review. I don't think so. The new feature accepts opening a cursor with some parameter names not specified: open

Re: [HACKERS] Why does WAL_DEBUG macro need to be defined by default?

2011-10-07 Thread Heikki Linnakangas
On 07.10.2011 12:19, Fujii Masao wrote: Hi, I found that by default WAL_DEBUG macro has been defined in 9.2dev and 9.1. I'm very surprised at this. Why does WAL_DEBUG need to be defined by default? The performance overhead introduced by WAL_DEBUG is really vanishingly low? WAL_DEBUG was

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

2011-10-07 Thread Etsuro Fujita
Hi, I'm very sorry for the late reply. (2011/09/21 10:00), Alvaro Herrera wrote: Excerpts from David Fetter's message of mar sep 20 21:22:32 -0300 2011: On Tue, Sep 20, 2011 at 11:13:05AM -0400, Tom Lane wrote: Probably a more interesting question is why we wouldn't change autovacuum so

Re: [HACKERS] libpq, PQdescribePrepared - PQftype, PQfmod, no PQnullable

2011-10-07 Thread Merlin Moncure
On Thu, Oct 6, 2011 at 5:02 PM, Alex Goncharov alex-goncha...@comcast.net wrote: ,--- I/Alex (Thu, 06 Oct 2011 14:02:14 -0400) * | My understanding is that libpq does not allow one to find if a result | set column is nullable. ,--- You/Merlin (Thu, 6 Oct 2011 15:16:18 -0500) * | why

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

2011-10-07 Thread David Fetter
On Fri, Oct 07, 2011 at 08:09:44PM +0900, Etsuro Fujita wrote: Hi, I'm very sorry for the late reply. (2011/09/21 10:00), Alvaro Herrera wrote: Excerpts from David Fetter's message of mar sep 20 21:22:32 -0300 2011: On Tue, Sep 20, 2011 at 11:13:05AM -0400, Tom Lane wrote: Probably a

Re: [HACKERS] libpq, PQdescribePrepared - PQftype, PQfmod, no PQnullable

2011-10-07 Thread Alex Goncharov
,--- Peter Eisentraut (Fri, 07 Oct 2011 11:14:09 +0300) * | On tor, 2011-10-06 at 20:15 -0400, Alex Goncharov wrote: | P.S. And on the odd chance that somebody thinks that this | functionality would be possible and helpful to add to libpq, and | the problem is in the lack of human

Re: [HACKERS] libpq, PQdescribePrepared - PQftype, PQfmod, no PQnullable

2011-10-07 Thread Alex Goncharov
,--- You/Merlin (Fri, 7 Oct 2011 07:39:57 -0500) * | On Thu, Oct 6, 2011 at 5:02 PM, Alex Goncharov | ,--- Merlin Moncure (Thu, 6 Oct 2011 16:28:56 -0500) * | | hm, good point.  not sure how it's useful though.  I suppose an | | application could leverage that for validation purposes,

Re: [HACKERS] alter table only ... drop constraint broken in HEAD

2011-10-07 Thread Robert Haas
On Thu, Oct 6, 2011 at 11:38 PM, Alex Hunsaker bada...@gmail.com wrote: Oh, I see the problem, and I now agree that it's the DROP CONSTRAINT code that is buggy. Want me to roll this fix in as part of the alter table only constraint patch? Or keep it split out? We might want to backpatch to at

Re: [HACKERS] Why does WAL_DEBUG macro need to be defined by default?

2011-10-07 Thread Robert Haas
On Fri, Oct 7, 2011 at 5:19 AM, Fujii Masao masao.fu...@gmail.com wrote: I found that by default WAL_DEBUG macro has been defined in 9.2dev and 9.1. I'm very surprised at this. Why does WAL_DEBUG need to be defined by default? The performance overhead introduced by WAL_DEBUG is really

Re: [HACKERS] [REVIEW] Patch for cursor calling with named parameters

2011-10-07 Thread Yeb Havinga
On 2011-10-07 12:21, Yeb Havinga wrote: On 2011-10-06 16:04, Royce Ausburn wrote: Initial Review for patch: http://archives.postgresql.org/pgsql-hackers/2011-09/msg00744.php Again, thank you very much for your thorough review. I'll update the patch so mixing positional and named parameters

[HACKERS] patch : Allow toast tables to be moved to a different tablespace

2011-10-07 Thread Julien Tachoires
Hi, Here's a patch to allow TOAST tables to be moved to a different tablespace. This item has been picked up from the TODO list. Main idea is to consider that a TOAST table can have its own tablespace. Regards, -- JT diff --git a/doc/src/sgml/ref/alter_table.sgml

Re: [HACKERS] alter table only ... drop constraint broken in HEAD

2011-10-07 Thread Alex Hunsaker
On Fri, Oct 7, 2011 at 07:53, Robert Haas robertmh...@gmail.com wrote:  The only way we could trip up in that case is if there were two identically named constraints.  We'd have to visit the first tuple, update it, then visit the second tuple, recurse (thus incrementing the command counter),

Re: [HACKERS] alter table only ... drop constraint broken in HEAD

2011-10-07 Thread Robert Haas
On Fri, Oct 7, 2011 at 11:19 AM, Alex Hunsaker bada...@gmail.com wrote: On Fri, Oct 7, 2011 at 07:53, Robert Haas robertmh...@gmail.com wrote:  The only way we could trip up in that case is if there were two identically named constraints.  We'd have to visit the first tuple, update it, then

[HACKERS] PQsendQuery/ PQgetResult Problem

2011-10-07 Thread Usama Dar
Hi Hackers, I have a strange problem, or maybe it's not a strange problem but just something wrong with my understanding i have SIP router which works with postgresql using libpq, somewhere in the code it inserts a row in the database and then when the insert is finished it invokes another module

Re: [HACKERS] WIP: Join push-down for foreign tables

2011-10-07 Thread Kohei KaiGai
2011年10月4日12:08 Shigeru Hanada shigeru.han...@gmail.com: In my opinion, FdwRoutine should have an additional API to inform the core its supported features; such as inner-join, outer-join, order-by, group-by, aggregate functions, insert, update, delete, etc... in the future version. Sure,

Re: [HACKERS] [v9.2] make_greater_string() does not return a string in some cases

2011-10-07 Thread Robert Haas
On Fri, Oct 7, 2011 at 12:22 AM, Kyotaro HORIGUCHI horiguchi.kyot...@oss.ntt.co.jp wrote: Thank you for reviewing. The new version of this patch is attached to this message. OK, I think this is reasonably close to being committable now. There are a few remaining style and grammar mistakes but

Re: [HACKERS] PQsendQuery/ PQgetResult Problem

2011-10-07 Thread Merlin Moncure
On Fri, Oct 7, 2011 at 11:17 AM, Usama Dar munir.us...@gmail.com wrote: Hi Hackers, I have a strange problem, or maybe it's not a strange problem but just something wrong with my understanding i have SIP router which works with postgresql using libpq, somewhere in the code it inserts a row in

Re: [HACKERS] alter table only ... drop constraint broken in HEAD

2011-10-07 Thread Alex Hunsaker
On Fri, Oct 7, 2011 at 09:50, Robert Haas robertmh...@gmail.com wrote: On Fri, Oct 7, 2011 at 11:19 AM, Alex Hunsaker bada...@gmail.com wrote: My only thought is perhaps we should add that missing unique index on (conrelid, conname). If we are not going to support duplicate names in the code,

Re: [HACKERS] Re: [COMMITTERS] pgsql: Force strings passed to and from plperl to be in UTF8 encoding.

2011-10-07 Thread Alex Hunsaker
On Wed, Oct 5, 2011 at 20:36, Robert Haas robertmh...@gmail.com wrote: On Wed, Oct 5, 2011 at 5:03 PM, Alex Hunsaker bada...@gmail.com wrote: On Wed, Oct 5, 2011 at 08:18, Robert Haas robertmh...@gmail.com wrote: On Wed, Oct 5, 2011 at 3:58 AM, Amit Khandekar amit.khande...@enterprisedb.com

Re: [HACKERS] Why does WAL_DEBUG macro need to be defined by default?

2011-10-07 Thread Kevin Grittner
Robert Haas robertmh...@gmail.com wrote: The funny thing is that I've been thinking all of these months about how convenient it is that we defined WAL_DEBUG in debug builds IMO, --enable-debug should not do anything but include debugging symbols. The ability to get a useful stack trace

Re: [HACKERS] Why does WAL_DEBUG macro need to be defined by default?

2011-10-07 Thread Robert Haas
On Fri, Oct 7, 2011 at 1:03 PM, Kevin Grittner kevin.gritt...@wicourts.gov wrote: Robert Haas robertmh...@gmail.com wrote: The funny thing is that I've been thinking all of these months about how convenient it is that we defined WAL_DEBUG in debug builds IMO, --enable-debug should not do

[HACKERS] [PATCH] Fix little typo in docs in func.sgml

2011-10-07 Thread Dickson S. Guedes
Hello all, This is a little patch to fix a typo in docs. In the length function should be a space between string and bytea. Best regards, -- Dickson S. Guedes mail/xmpp: gue...@guedesoft.net - skype: guediz http://guedesoft.net - http://www.postgresql.org.br diff --git a/doc/src/sgml/func.sgml

Re: [HACKERS] ToDo: allow to get a number of processed rows by COPY statement

2011-10-07 Thread Kevin Grittner
Pavel Stehule pavel.steh...@gmail.com wrote: There is not possible to get a number of processed rows when COPY is evaluated via SPI. Client can use a tag, but SPI doesn't use a tag. I propose a small change a ProcessUtility to return a processed rows. Please add this to the open

Re: [HACKERS] pg_upgrade - add config directory setting

2011-10-07 Thread Bruce Momjian
Bruce Momjian wrote: Bruce Momjian wrote: I will now work on pg_upgrade to also use the new flag to find the data directory from a config-only install. However, this is only available in PG 9.2, and it will only be in PG 9.3 that you can hope to use this feature (if old is PG 9.2 or

Re: [HACKERS] index-only scans

2011-10-07 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: Please find attached a patch implementing a basic version of index-only scans. I'm making some progress with this, but I notice what seems like a missing feature: there needs to be a way to turn it off. Otherwise performance comparisons will be

Re: [HACKERS] index-only scans

2011-10-07 Thread Joshua D. Drake
On 10/07/2011 11:40 AM, Tom Lane wrote: Robert Haasrobertmh...@gmail.com writes: Please find attached a patch implementing a basic version of index-only scans. I'm making some progress with this, but I notice what seems like a missing feature: there needs to be a way to turn it off.

Re: [HACKERS] index-only scans

2011-10-07 Thread Robert Haas
On Fri, Oct 7, 2011 at 2:40 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: Please find attached a patch implementing a basic version of index-only scans. I'm making some progress with this, but I notice what seems like a missing feature: there needs to be a

Re: [HACKERS] index-only scans

2011-10-07 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Fri, Oct 7, 2011 at 2:40 PM, Tom Lane t...@sss.pgh.pa.us wrote: I'm making some progress with this, but I notice what seems like a missing feature: there needs to be a way to turn it off.  Otherwise performance comparisons will be difficult to

Re: [HACKERS] [OT?] Time-zone database down [was: Re: timezone buglet?]

2011-10-07 Thread Bruce Momjian
Andrea Suisani wrote: On 10/05/2011 07:37 AM, Tom Lane wrote: davegda...@sonic.net writes: Postgresql 9.0.4 has the timezone: America/Blanc-Sablon However other sources seem to spell this with an underscore instead of dash: America/Blanc_Sablon I don't know what other

Re: [HACKERS] Why does WAL_DEBUG macro need to be defined by default?

2011-10-07 Thread Bruce Momjian
Robert Haas wrote: On Fri, Oct 7, 2011 at 1:03 PM, Kevin Grittner kevin.gritt...@wicourts.gov wrote: Robert Haas robertmh...@gmail.com wrote: The funny thing is that I've been thinking all of these months about how convenient it is that we defined WAL_DEBUG in debug builds IMO,

Re: [HACKERS] [OT?] Time-zone database down [was: Re: timezone buglet?]

2011-10-07 Thread Tom Lane
Bruce Momjian br...@momjian.us writes: Andrea Suisani wrote: Speaking of Olson tz database, I've just stumbled across this post and I thought it would be worthy to report it here: http://blog.joda.org/2011/10/today-time-zone-database-was-closed.html I suppose there is nothing stopping them

Re: [HACKERS] [OT?] Time-zone database down [was: Re: timezone buglet?]

2011-10-07 Thread Bruce Momjian
Tom Lane wrote: Bruce Momjian br...@momjian.us writes: Andrea Suisani wrote: Speaking of Olson tz database, I've just stumbled across this post and I thought it would be worthy to report it here: http://blog.joda.org/2011/10/today-time-zone-database-was-closed.html I suppose there is

Re: [HACKERS] [OT?] Time-zone database down [was: Re: timezone buglet?]

2011-10-07 Thread Peter Geoghegan
On 7 October 2011 21:27, Bruce Momjian br...@momjian.us wrote: Tom Lane wrote: It seems pretty baseless to me: you can't copyright a collection of facts.  I think we should do nothing pending a court decision. Agreed.  I am just pointing out the possible exposure. The one interesting case

Re: [HACKERS] [OT?] Time-zone database down [was: Re: timezone buglet?]

2011-10-07 Thread Thom Brown
On 7 October 2011 21:17, Tom Lane t...@sss.pgh.pa.us wrote: Bruce Momjian br...@momjian.us writes: Andrea Suisani wrote: Speaking of Olson tz database, I've just stumbled across this post and I thought it would be worthy to report it here:

Re: [HACKERS] [OT?] Time-zone database down [was: Re: timezone buglet?]

2011-10-07 Thread Merlin Moncure
On Fri, Oct 7, 2011 at 3:33 PM, Peter Geoghegan pe...@2ndquadrant.com wrote: On 7 October 2011 21:27, Bruce Momjian br...@momjian.us wrote: Tom Lane wrote: It seems pretty baseless to me: you can't copyright a collection of facts.  I think we should do nothing pending a court decision.

Re: [HACKERS] [OT?] Time-zone database down [was: Re: timezone buglet?]

2011-10-07 Thread Mark Mielke
My original read of the problem determined (for me personally) that the only way one could be in violation of copyright was if the data was incorrect (i.e. not factual). It presented an interesting contradiction. The only way they could sue is by agreeing that their data is faulty and should

Re: [HACKERS] [OT?] Time-zone database down [was: Re: timezone buglet?]

2011-10-07 Thread Merlin Moncure
On Fri, Oct 7, 2011 at 4:20 PM, Mark Mielke m...@mark.mielke.cc wrote: My original read of the problem determined (for me personally) that the only way one could be in violation of copyright was if the data was incorrect (i.e. not factual). It presented an interesting contradiction. The only

Re: [HACKERS] [v9.2] Fix Leaky View Problem

2011-10-07 Thread Noah Misch
On Sun, Oct 02, 2011 at 07:16:33PM +0200, Kohei KaiGai wrote: My preference is still also WITH(security_barrier=...) syntax. The arguable point was the behavior when a view is replaced without explicit WITH clause; whether we should consider it was specified a default value, or we should

Re: [HACKERS] index-only scans

2011-10-07 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: Please find attached a patch implementing a basic version of index-only scans. This patch is the work of my colleague Ibrar Ahmed and myself, and also incorporates some code from previous patches posted by Heikki Linnakanagas. I've committed this

Re: [HACKERS] Why does WAL_DEBUG macro need to be defined by default?

2011-10-07 Thread Robert Haas
On Fri, Oct 7, 2011 at 4:06 PM, Bruce Momjian br...@momjian.us wrote: Robert Haas wrote: On Fri, Oct 7, 2011 at 1:03 PM, Kevin Grittner kevin.gritt...@wicourts.gov wrote: Robert Haas robertmh...@gmail.com wrote: The funny thing is that I've been thinking all of these months about how

Re: [HACKERS] index-only scans

2011-10-07 Thread Robert Haas
On Fri, Oct 7, 2011 at 8:14 PM, Tom Lane t...@sss.pgh.pa.us wrote: 1. The way that nodeIndexscan.c builds up the faux heap tuple is perhaps susceptible to improvement.  I thought about building a virtual tuple, but then what do I do with an OID column, if I have one?  Or maybe this should be

Re: [HACKERS] Why does WAL_DEBUG macro need to be defined by default?

2011-10-07 Thread Bruce Momjian
Robert Haas wrote: On Fri, Oct 7, 2011 at 4:06 PM, Bruce Momjian br...@momjian.us wrote: Robert Haas wrote: On Fri, Oct 7, 2011 at 1:03 PM, Kevin Grittner kevin.gritt...@wicourts.gov wrote: Robert Haas robertmh...@gmail.com wrote: The funny thing is that I've been thinking all of

Re: [HACKERS] Why does WAL_DEBUG macro need to be defined by default?

2011-10-07 Thread Robert Haas
On Fri, Oct 7, 2011 at 9:59 PM, Bruce Momjian br...@momjian.us wrote: Robert Haas wrote: On Fri, Oct 7, 2011 at 4:06 PM, Bruce Momjian br...@momjian.us wrote: Robert Haas wrote: On Fri, Oct 7, 2011 at 1:03 PM, Kevin Grittner kevin.gritt...@wicourts.gov wrote: Robert Haas

Re: [HACKERS] [OT?] Time-zone database down [was: Re: timezone buglet?]

2011-10-07 Thread Greg Stark
On Fri, Oct 7, 2011 at 10:10 PM, Merlin Moncure mmonc...@gmail.com wrote: On 7 October 2011 21:27, Bruce Momjian br...@momjian.us wrote: Tom Lane wrote: It seems pretty baseless to me: you can't copyright a collection of facts.  I think we should do nothing pending a court decision. The one

Re: [HACKERS] Review: Non-inheritable check constraints

2011-10-07 Thread Nikhil Sontakke
Hi Alex, I guess we both are in agreement with each other :) After sleeping over it, I think that check is indeed dead code with this new non-inheritable check constraints functionality in place. So unless you have some other comments, we can mark this as 'Ready for Commiter'. Again, thanks for

Re: [HACKERS] [PATCH] Fix little typo in docs in func.sgml

2011-10-07 Thread Robert Haas
On Fri, Oct 7, 2011 at 1:36 PM, Dickson S. Guedes lis...@guedesoft.net wrote: This is a little patch to fix a typo in docs. In the length function should be a space between string and bytea. Committed. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company

Re: [HACKERS] [OT?] Time-zone database down [was: Re: timezone buglet?]

2011-10-07 Thread Jaime Casanova
On Fri, Oct 7, 2011 at 10:02 PM, Greg Stark st...@mit.edu wrote: All that said I think this is far murkier than you all seem to think. Copyright law is one of the most complex areas of the law and this is one of the least well defined parts of copyright law. imposing no natural restrictions