Skip site navigation (1) Skip section navigation (2)

Re: pgsql: Add COST and ROWS options to CREATE/ALTER FUNCTION, plus

From: "Jim C(dot) Nasby" <jim(at)nasby(dot)net>
To: Tom Lane <tgl(at)postgresql(dot)org>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Add COST and ROWS options to CREATE/ALTER FUNCTION, plus
Date: 2007-01-22 17:39:01
Message-ID: 20070122173900.GE64372@nasby.net (view raw or flat)
Thread:
Lists: pgsql-committers
Any plans to extend psql's \df+ to get that information?

On Sun, Jan 21, 2007 at 09:35:23PM -0400, Tom Lane wrote:
> Log Message:
> -----------
> Add COST and ROWS options to CREATE/ALTER FUNCTION, plus underlying pg_proc
> columns procost and prorows, to allow simple user adjustment of the estimated
> cost of a function call, as well as control of the estimated number of rows
> returned by a set-returning function.  We might eventually wish to extend this
> to allow function-specific estimation routines, but there seems to be
> consensus that we should try a simple constant estimate first.  In particular
> this provides a relatively simple way to control the order in which different
> WHERE clauses are applied in a plan node, which is a Good Thing in view of the
> fact that the recent EquivalenceClass planner rewrite made that much less
> predictable than before.
> 
> Modified Files:
> --------------
>     pgsql/doc/src/sgml:
>         catalogs.sgml (r2.142 -> r2.143)
>         (http://developer.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/catalogs.sgml.diff?r1=2.142&r2=2.143)
>     pgsql/doc/src/sgml/ref:
>         alter_function.sgml (r1.12 -> r1.13)
>         (http://developer.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/alter_function.sgml.diff?r1=1.12&r2=1.13)
>         create_function.sgml (r1.70 -> r1.71)
>         (http://developer.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/create_function.sgml.diff?r1=1.70&r2=1.71)
>     pgsql/src/backend/bootstrap:
>         bootstrap.c (r1.228 -> r1.229)
>         (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/bootstrap/bootstrap.c.diff?r1=1.228&r2=1.229)
>     pgsql/src/backend/catalog:
>         pg_aggregate.c (r1.84 -> r1.85)
>         (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/catalog/pg_aggregate.c.diff?r1=1.84&r2=1.85)
>         pg_proc.c (r1.142 -> r1.143)
>         (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/catalog/pg_proc.c.diff?r1=1.142&r2=1.143)
>     pgsql/src/backend/commands:
>         functioncmds.c (r1.81 -> r1.82)
>         (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/functioncmds.c.diff?r1=1.81&r2=1.82)
>         proclang.c (r1.70 -> r1.71)
>         (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/proclang.c.diff?r1=1.70&r2=1.71)
>     pgsql/src/backend/optimizer/path:
>         costsize.c (r1.175 -> r1.176)
>         (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/path/costsize.c.diff?r1=1.175&r2=1.176)
>     pgsql/src/backend/optimizer/plan:
>         createplan.c (r1.222 -> r1.223)
>         (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/plan/createplan.c.diff?r1=1.222&r2=1.223)
>         setrefs.c (r1.127 -> r1.128)
>         (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/plan/setrefs.c.diff?r1=1.127&r2=1.128)
>     pgsql/src/backend/optimizer/util:
>         clauses.c (r1.230 -> r1.231)
>         (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/util/clauses.c.diff?r1=1.230&r2=1.231)
>     pgsql/src/backend/parser:
>         gram.y (r2.574 -> r2.575)
>         (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/gram.y.diff?r1=2.574&r2=2.575)
>         keywords.c (r1.181 -> r1.182)
>         (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/keywords.c.diff?r1=1.181&r2=1.182)
>     pgsql/src/backend/utils:
>         Gen_fmgrtab.sh (r1.34 -> r1.35)
>         (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/Gen_fmgrtab.sh.diff?r1=1.34&r2=1.35)
>     pgsql/src/backend/utils/cache:
>         lsyscache.c (r1.145 -> r1.146)
>         (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/cache/lsyscache.c.diff?r1=1.145&r2=1.146)
>     pgsql/src/bin/pg_dump:
>         pg_dump.c (r1.456 -> r1.457)
>         (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/bin/pg_dump/pg_dump.c.diff?r1=1.456&r2=1.457)
>     pgsql/src/include/catalog:
>         catversion.h (r1.375 -> r1.376)
>         (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/catalog/catversion.h.diff?r1=1.375&r2=1.376)
>         pg_attribute.h (r1.129 -> r1.130)
>         (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/catalog/pg_attribute.h.diff?r1=1.129&r2=1.130)
>         pg_class.h (r1.99 -> r1.100)
>         (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/catalog/pg_class.h.diff?r1=1.99&r2=1.100)
>         pg_proc.h (r1.439 -> r1.440)
>         (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/catalog/pg_proc.h.diff?r1=1.439&r2=1.440)
>     pgsql/src/include/optimizer:
>         clauses.h (r1.85 -> r1.86)
>         (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/optimizer/clauses.h.diff?r1=1.85&r2=1.86)
>         cost.h (r1.83 -> r1.84)
>         (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/optimizer/cost.h.diff?r1=1.83&r2=1.84)
>         planmain.h (r1.98 -> r1.99)
>         (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/optimizer/planmain.h.diff?r1=1.98&r2=1.99)
>     pgsql/src/include/utils:
>         lsyscache.h (r1.114 -> r1.115)
>         (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/utils/lsyscache.h.diff?r1=1.114&r2=1.115)
>     pgsql/src/test/regress/expected:
>         opr_sanity.out (r1.71 -> r1.72)
>         (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/opr_sanity.out.diff?r1=1.71&r2=1.72)
>     pgsql/src/test/regress/sql:
>         opr_sanity.sql (r1.57 -> r1.58)
>         (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/sql/opr_sanity.sql.diff?r1=1.57&r2=1.58)
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster
> 

-- 
Jim Nasby                                            jim(at)nasby(dot)net
EnterpriseDB      http://enterprisedb.com      512.569.9461 (cell)

In response to

pgsql-committers by date

Next:From: Bruce MomjianDate: 2007-01-22 18:31:51
Subject: pgsql: When system() fails in Win32, report it as an exception, print
Previous:From: Bruce MomjianDate: 2007-01-22 02:47:56
Subject: pgsql: Update documenation instructions.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group