Re: [HACKERS] Last gasp

2012-04-15 Thread Hitoshi Harada
On Sat, Apr 14, 2012 at 2:28 PM, Jay Levitt jay.lev...@gmail.com wrote: Christopher Browne wrote: On Thu, Apr 12, 2012 at 6:11 PM, Jay Levittjay.lev...@gmail.com  wrote: Rather than extend the CF app into a trivial-patch workflow app, it might be worth looking at integrating it with github.

[HACKERS] Clobbered parameter names via DECLARE in PL/PgSQL

2012-04-15 Thread Brendan Jurd
Hello hackers, It turns out that in a PL/PgSQL function, you can DECLARE a variable using the same name as one of the function parameters. This has the effect of clobbering the parameter, for example: CREATE OR REPLACE FUNCTION declare_clobber(foo int) RETURNS int LANGUAGE plpgsql AS $$

Re: [HACKERS] Clobbered parameter names via DECLARE in PL/PgSQL

2012-04-15 Thread Pavel Stehule
2012/4/15 Brendan Jurd dire...@gmail.com: Hello hackers, It turns out that in a PL/PgSQL function, you can DECLARE a variable using the same name as one of the function parameters.  This has the effect of clobbering the parameter, for example: CREATE OR REPLACE FUNCTION declare_clobber(foo

Re: [HACKERS] Clobbered parameter names via DECLARE in PL/PgSQL

2012-04-15 Thread Brendan Jurd
On 15 April 2012 17:55, Pavel Stehule pavel.steh...@gmail.com wrote: 2012/4/15 Brendan Jurd dire...@gmail.com: It turns out that in a PL/PgSQL function, you can DECLARE a variable using the same name as one of the function parameters.  This has the effect of clobbering the parameter, for

Re: [HACKERS] Clobbered parameter names via DECLARE in PL/PgSQL

2012-04-15 Thread Pavel Stehule
2012/4/15 Brendan Jurd dire...@gmail.com: On 15 April 2012 17:55, Pavel Stehule pavel.steh...@gmail.com wrote: 2012/4/15 Brendan Jurd dire...@gmail.com: It turns out that in a PL/PgSQL function, you can DECLARE a variable using the same name as one of the function parameters.  This has the

Re: [HACKERS] query planner does not canonicalize infix operators

2012-04-15 Thread Dimitri Fontaine
Tom Lane t...@sss.pgh.pa.us writes: More generally, I'm not prepared to buy into the idea that the planner should be expected to recognize alternate spellings of the same expression. There are too many variants of that idea that are infeasible either because the planner doesn't have the

Re: [HACKERS] Clobbered parameter names via DECLARE in PL/PgSQL

2012-04-15 Thread Brendan Jurd
On 15 April 2012 18:54, Pavel Stehule pavel.steh...@gmail.com wrote: 2012/4/15 Brendan Jurd dire...@gmail.com: Perhaps it's a failure of imagination on my part, but I can't think of a legitimate reason for a programmer to deliberately use the same name to refer to a declared variable and a

Re: [HACKERS] [BUGS] BUG #6572: The example of SPI_execute is bogus

2012-04-15 Thread Boszormenyi Zoltan
2012-04-14 18:15 keltezéssel, Peter Eisentraut írta: On lör, 2012-04-14 at 08:23 -0400, Robert Haas wrote: On Sat, Apr 14, 2012 at 3:27 AM, Pavel Stehulepavel.steh...@gmail.com wrote: It has a lot of sense. Without it, it's very difficult to do logical replication on a table with no primary

Re: [HACKERS] [BUGS] BUG #6572: The example of SPI_execute is bogus

2012-04-15 Thread Pavel Stehule
2012/4/15 Boszormenyi Zoltan z...@cybertec.at: 2012-04-14 18:15 keltezéssel, Peter Eisentraut írta: On lör, 2012-04-14 at 08:23 -0400, Robert Haas wrote: On Sat, Apr 14, 2012 at 3:27 AM, Pavel Stehulepavel.steh...@gmail.com  wrote: It has a lot of sense.  Without it, it's very difficult to

Re: [HACKERS] Clobbered parameter names via DECLARE in PL/PgSQL

2012-04-15 Thread Pavel Stehule
2012/4/15 Brendan Jurd dire...@gmail.com: On 15 April 2012 18:54, Pavel Stehule pavel.steh...@gmail.com wrote: 2012/4/15 Brendan Jurd dire...@gmail.com: Perhaps it's a failure of imagination on my part, but I can't think of a legitimate reason for a programmer to deliberately use the same name

Re: [HACKERS] Last gasp

2012-04-15 Thread Simon Riggs
On Fri, Apr 6, 2012 at 8:19 AM, Tom Lane t...@sss.pgh.pa.us wrote: Greg Smith g...@2ndquadrant.com writes: On 04/05/2012 04:27 PM, Simon Riggs wrote: It's shocking since after months of work and an especially extended edition CF, we expect people to deliver something, not just shunt the whole

Re: [HACKERS] index-only scans vs. Hot Standby, round two

2012-04-15 Thread Simon Riggs
On Fri, Apr 13, 2012 at 5:33 PM, Robert Haas robertmh...@gmail.com wrote: Currently, we have a problem with index-only scans in Hot Standby mode: the xmin horizon on the standby might lag the master, and thus an index-only scan might mistakenly conclude that no heap fetch is needed when in

Re: [HACKERS] Last gasp

2012-04-15 Thread Simon Riggs
On Wed, Apr 11, 2012 at 6:59 PM, Robert Haas robertmh...@gmail.com wrote: On Wed, Apr 11, 2012 at 1:39 PM, Joshua Berkus j...@agliodbs.com wrote: Ultimately, we're herding cats here.  I don't think you're going to get the community to suddenly be willing to march in lockstep instead. If you,

[HACKERS] documentation bug - missing info about unpackaged control files for extension

2012-04-15 Thread Pavel Stehule
Hello is somewhere documented sense of foo--unpackaged--version.sql files? Regards Pavel -- 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] Clobbered parameter names via DECLARE in PL/PgSQL

2012-04-15 Thread Andrew Dunstan
On 04/15/2012 03:49 AM, Brendan Jurd wrote: Hello hackers, It turns out that in a PL/PgSQL function, you can DECLARE a variable using the same name as one of the function parameters. This has the effect of clobbering the parameter, for example: ... I would suggest that if the user

Re: [HACKERS] Last gasp

2012-04-15 Thread Simon Riggs
On Sat, Apr 7, 2012 at 10:20 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: [ among other good points ] ... On a related note, letting CommitFests go on for three months because there's insufficient reviewer activity to get them done in one or two is, in my

Re: [HACKERS] Last gasp

2012-04-15 Thread Simon Riggs
On Sat, Apr 7, 2012 at 9:51 PM, Robert Haas robertmh...@gmail.com wrote: I think this basically just boils down to too many patches and not enough people.  I was interested in Command Triggers from the beginning of this CommitFest, and I would have liked to pick it up sooner, but there were a

Re: [HACKERS] Last gasp

2012-04-15 Thread Simon Riggs
On Tue, Apr 10, 2012 at 3:26 PM, Kevin Grittner kevin.gritt...@wicourts.gov wrote: Christopher Browne cbbro...@gmail.com wrote: Robert Haas robertmh...@gmail.com wrote: CommitFests are a time for patches that are done or very nearly done to get committed, and a time for other patches to get

Re: [HACKERS] documentation bug - missing info about unpackaged control files for extension

2012-04-15 Thread Heikki Linnakangas
On 15.04.2012 13:47, Pavel Stehule wrote: is somewhere documented sense of foo--unpackaged--version.sql files? See section 35.15.4. Extension Updates, paragraph starting with The update mechanism can be used to solve an important special case: converting a loose collection of objects into an

Re: [HACKERS] query planner does not canonicalize infix operators

2012-04-15 Thread Tom Lane
Dimitri Fontaine dimi...@2ndquadrant.fr writes: Looks like we're missing out some operator properties, like the neutral element and if the operator is transitive, commutative or associative. I think I remember us talking about how knowing about operators being associative would also help

Re: [HACKERS] Clobbered parameter names via DECLARE in PL/PgSQL

2012-04-15 Thread Tom Lane
Pavel Stehule pavel.steh...@gmail.com writes: We can raise warning from CREATE OR REPLACE FUNCTION - but I would to like have plpgsql_check_function inside core - and it is better place for this and similar issues. I agree. This is a perfectly legal use of nested declaration scopes, so it

Re: [HACKERS] Last gasp

2012-04-15 Thread Tom Lane
Simon Riggs si...@2ndquadrant.com writes: I completely agree that somebody has to be willing to say No, since we all agree that the default for any patch is non-acceptance. My first observation is that if No is received early enough for something to be done, then the outcome could be

Re: [HACKERS] Last gasp

2012-04-15 Thread Tom Lane
Simon Riggs si...@2ndquadrant.com writes: If we can do Triage Week at the beginning, that will keep out the ones that aren't ready and allow us to focus our attention on the ones we really care about. I think there's some merit in this idea, but there needs to be time allocated to examine all

Re: [HACKERS] Clobbered parameter names via DECLARE in PL/PgSQL

2012-04-15 Thread Pavel Stehule
2012/4/15 Tom Lane t...@sss.pgh.pa.us: Pavel Stehule pavel.steh...@gmail.com writes: We can raise warning from CREATE OR REPLACE FUNCTION - but I would to like have plpgsql_check_function inside core - and it is better place for this and similar issues. I agree.  This is a perfectly legal

Re: [HACKERS] [BUGS] BUG #6572: The example of SPI_execute is bogus

2012-04-15 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Thu, Apr 5, 2012 at 2:39 AM, Hitoshi Harada umi.tan...@gmail.com wrote: On Wed, Apr 4, 2012 at 8:00 AM, Tom Lane t...@sss.pgh.pa.us wrote: Given the lack of complaints since 9.0, maybe we should not fix this but just redefine the new behavior as

Re: [HACKERS] documentation bug - missing info about unpackaged control files for extension

2012-04-15 Thread Pavel Stehule
2012/4/15 Heikki Linnakangas heikki.linnakan...@enterprisedb.com: On 15.04.2012 13:47, Pavel Stehule wrote: is somewhere documented sense of foo--unpackaged--version.sql files? See section 35.15.4. Extension Updates, paragraph starting with The update mechanism can be used to solve an

Re: [HACKERS] Fix PL/Python metadata when there is no result

2012-04-15 Thread Peter Eisentraut
On fre, 2012-02-10 at 17:44 +0100, Jean-Baptiste Quenot wrote: Dear hackers, Thanks for the work on PLPython result metadata, it is very useful! I just came across a crash when trying to access this metadata on the result of an UPDATE, which obviously cannot return any tuple (unless you

Re: [HACKERS] Last gasp

2012-04-15 Thread Simon Riggs
On Sun, Apr 15, 2012 at 4:50 PM, Tom Lane t...@sss.pgh.pa.us wrote: I think this is a rather unfair summary of the history.  It was clear very early in the CF that people thought Command Triggers had major design problems, and Dimitri was doing significant rewrites to try to fix that.  Anyone

Re: [HACKERS] how to create a non-inherited CHECK constraint in CREATE TABLE

2012-04-15 Thread Noah Misch
On Thu, Apr 12, 2012 at 10:50:31AM +0530, Nikhil Sontakke wrote: CHECK NO INHERIT sounds fine to me; will that display ALTER TABLE ONLY x as the one true way of doing this? s/display/displace/, I think you meant? Yeah, that's what I understand the proposal to be. +1 for that

Re: [HACKERS] Last gasp

2012-04-15 Thread Greg Smith
On 04/14/2012 06:03 PM, Robert Haas wrote: If someone's work is going to require substantial revision, it is much better and much less work to do that revision before the code goes into our repository (and particularly, before it gets released) rather than after. I would think one of the major

Re: [HACKERS] Last gasp

2012-04-15 Thread Greg Smith
On 04/14/2012 05:28 PM, Jay Levitt wrote: I see now that the Reviewing a Patch wiki page explains this, but maybe this info should be pushed higher into the docs and web site; a How can I contribute page, open calls for reviewers on the non-hackers mailing lists, things like that. Or maybe just

Re: [HACKERS] Last gasp

2012-04-15 Thread Greg Smith
On 04/15/2012 05:46 AM, Simon Riggs wrote: Our problem is not lack of resource, it is ineffective delegation. As Hannu points out, he didn't know the patch would be rejected, so he didn't know help was needed to save something useful. I considered that the job of the CF manager, but perhaps it

Re: [HACKERS] Last gasp

2012-04-15 Thread Alvaro Herrera
Excerpts from Alex's message of dom abr 15 01:52:16 -0300 2012: Jay Levitt jay.lev...@gmail.com writes: Alex wrote: I didn't follow this whole thread, but have we considered Redmine[1]? As the resident Ruby is shiny, let's do everything in Rails on my MacBook guy, I'd like to make

Re: [HACKERS] ECPG FETCH readahead

2012-04-15 Thread Michael Meskes
On Tue, Apr 10, 2012 at 07:56:35PM +0200, Boszormenyi Zoltan wrote: With the above, it would be possible to use a comma separated list of -r suboptions, e.g. -r prepare,questionmarks,readahead=16 in one option. Yes, that sounds like a good plan. But of course it's outside the scope of this

Re: [HACKERS] Improving our clauseless-join heuristics

2012-04-15 Thread Amit Kapila
I want to clarify small doubt in this regard. In function make_rels_by_clause_joins(..), it tries to join the given relation old_rel with other relations if there exist a join between them. What I can understand is, it is because if there exists a join condition its better to join with that

Re: [HACKERS] Improving our clauseless-join heuristics

2012-04-15 Thread Tom Lane
Amit Kapila amit.kap...@huawei.com writes: I want to clarify small doubt in this regard. In function make_rels_by_clause_joins(..), it tries to join the given relation old_rel with other relations if there exist a join between them. What I can understand is, it is because if there exists a

Re: [HACKERS] Improving our clauseless-join heuristics

2012-04-15 Thread Amit Kapila
That case is handled by make_rels_by_clauseless_joins It will be handled by make_rels_by_clauseless_joins() if given rel old_rel doesn't have any join clause. However if it has join clause but doesn't able to join with any other rels like in the example you have provided for relation c, it is

Re: [HACKERS] ECPG FETCH readahead

2012-04-15 Thread Boszormenyi Zoltan
2012-04-16 04:46 keltezéssel, Michael Meskes írta: On Tue, Apr 10, 2012 at 07:56:35PM +0200, Boszormenyi Zoltan wrote: With the above, it would be possible to use a comma separated list of -r suboptions, e.g. -r prepare,questionmarks,readahead=16 in one option. Yes, that sounds like a good

Re: [HACKERS] Improving our clauseless-join heuristics

2012-04-15 Thread Tom Lane
Amit Kapila amit.kap...@huawei.com writes: That case is handled by make_rels_by_clauseless_joins It will be handled by make_rels_by_clauseless_joins() if given rel old_rel doesn't have any join clause. However if it has join clause but doesn't able to join with any other rels like in the

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

[HACKERS] 9.3 Pre-proposal: Range Merge Join

2012-04-15 Thread Jeff Davis
I hope this is not an inappropriate time for 9.3 discussions. The flip side of asking for submissions in the first couple commitfests means that I need to submit proposals now. What is a Range Join? See attached SQL for example. The key difference is that the join condition is not equality, but