mirror of
https://github.com/postgres/postgres.git
synced 2025-08-27 07:42:10 +03:00
Code review for bigint-LIMIT patch. Fix missed planner dependency,
eliminate unnecessary code, force initdb because stored rules change (limit nodes are now supposed to be int8 not int4 expressions). Update comments and error messages, which still all said 'integer'.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/optimizer/plan/planagg.c,v 1.18 2006/07/14 14:52:20 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/optimizer/plan/planagg.c,v 1.19 2006/07/26 19:31:50 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -459,9 +459,9 @@ make_agg_subplan(PlannerInfo *root, MinMaxAggInfo *info)
|
||||
|
||||
/* set up LIMIT 1 */
|
||||
subparse->limitOffset = NULL;
|
||||
subparse->limitCount = (Node *) makeConst(INT4OID, sizeof(int4),
|
||||
Int32GetDatum(1),
|
||||
false, true);
|
||||
subparse->limitCount = (Node *) makeConst(INT8OID, sizeof(int64),
|
||||
Int64GetDatum(1),
|
||||
false, false /* not by val */);
|
||||
|
||||
/*
|
||||
* Generate the plan for the subquery. We already have a Path for the
|
||||
|
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/optimizer/plan/planner.c,v 1.204 2006/07/26 00:34:48 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/optimizer/plan/planner.c,v 1.205 2006/07/26 19:31:50 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -1129,7 +1129,6 @@ preprocess_limit(PlannerInfo *root, double tuple_fraction,
|
||||
else
|
||||
{
|
||||
*offset_est = DatumGetInt64(((Const *) est)->constvalue);
|
||||
|
||||
if (*offset_est < 0)
|
||||
*offset_est = 0; /* less than 0 is same as 0 */
|
||||
}
|
||||
|
Reference in New Issue
Block a user