Re: [COMMITTERS] pgsql: Fix an oversight in the 8.2 patch that improved mergejoin

2008-09-06 Thread Gregory Stark
[EMAIL PROTECTED] (Tom Lane) writes:

> (The materialize protects the sort from having to support mark/restore,
> allowing it to do its final merge pass on-the-fly.) We neglected to teach
> cost_mergejoin about that hack, so it was failing to include the
> materialize's costs in the estimated cost of the mergejoin.

Is that right? The materialize is just doing the same writing that the final
pass of the sort would have been doing. Did we discount the costs for sort for
that skipping writing that final pass when that was done?

-- 
  Gregory Stark
  EnterpriseDB  http://www.enterprisedb.com
  Ask me about EnterpriseDB's 24x7 Postgres support!

-- 
Sent via pgsql-committers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


Re: [COMMITTERS] pgsql: Fix an oversight in the 8.2 patch that improved mergejoin

2008-09-06 Thread Simon Riggs

On Sat, 2008-09-06 at 13:06 +0100, Gregory Stark wrote:
> [EMAIL PROTECTED] (Tom Lane) writes:
> 
> > (The materialize protects the sort from having to support mark/restore,
> > allowing it to do its final merge pass on-the-fly.) We neglected to teach
> > cost_mergejoin about that hack, so it was failing to include the
> > materialize's costs in the estimated cost of the mergejoin.
> 
> Is that right? The materialize is just doing the same writing that the final
> pass of the sort would have been doing. Did we discount the costs for sort for
> that skipping writing that final pass when that was done?

IIRC the cost of the sort didn't include the final merge, so when we
avoided the final merge the cost model for the sort became accurate.
Perhaps we should add something when we don't do that.

It seems reasonable than an extra node should cost something anyhow, and
the per tuple cost is the current standard way of indicating that extra
cost.

-- 
 Simon Riggs   www.2ndQuadrant.com
 PostgreSQL Training, Services and Support


-- 
Sent via pgsql-committers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Adjust psql's new \ef command to present an empty CREATE FUNCTION

2008-09-06 Thread Tom Lane
Log Message:
---
Adjust psql's new \ef command to present an empty CREATE FUNCTION template
for editing if no function name is specified.  This seems a much cleaner way
to offer that functionality than the original patch had.  In passing,
de-clutter the error displays that are given for a bogus function-name
argument, and standardize on "$function$" as the default delimiter for the
function body.  (The original coding would use the shortest possible
dollar-quote delimiter, which seems to create unnecessarily high risk of
later conflicts with the user-modified function body.)

Modified Files:
--
pgsql/doc/src/sgml/ref:
psql-ref.sgml (r1.210 -> r1.211)

(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/psql-ref.sgml?r1=1.210&r2=1.211)
pgsql/src/backend/utils/adt:
ruleutils.c (r1.283 -> r1.284)

(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/ruleutils.c?r1=1.283&r2=1.284)
pgsql/src/bin/psql:
command.c (r1.194 -> r1.195)

(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/bin/psql/command.c?r1=1.194&r2=1.195)

-- 
Sent via pgsql-committers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Clarify documention workding for xip_list().

2008-09-06 Thread Bruce Momjian
Log Message:
---
Clarify documention workding for xip_list().

Simon Riggs

Modified Files:
--
pgsql/doc/src/sgml:
func.sgml (r1.444 -> r1.445)

(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/func.sgml?r1=1.444&r2=1.445)

-- 
Sent via pgsql-committers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Add a few more details in the source-code-formatting

2008-09-06 Thread Tom Lane
Log Message:
---
Add a few more details in the source-code-formatting documentation.
This isn't exhaustive but it covers some of the more common layout
mistakes I've seen in submitted patches.

Modified Files:
--
pgsql/doc/src/sgml:
sources.sgml (r2.30 -> r2.31)

(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/sources.sgml?r1=2.30&r2=2.31)

-- 
Sent via pgsql-committers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Reimplement text_position and related functions to use

2008-09-06 Thread Tom Lane
Log Message:
---
Reimplement text_position and related functions to use Boyer-Moore-Horspool
searching instead of naive matching.  In the worst case this has the same
O(M*N) complexity as the naive method, but the worst case is hard to hit,
and the average case is very fast, especially with longer patterns.

David Rowley

Modified Files:
--
pgsql/src/backend/utils/adt:
varlena.c (r1.167 -> r1.168)

(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/varlena.c?r1=1.167&r2=1.168)

-- 
Sent via pgsql-committers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers