1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-13 07:41:39 +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:
Tom Lane
2006-07-26 19:31:51 +00:00
parent 5ffa0bb47a
commit a998a69247
9 changed files with 54 additions and 66 deletions

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/parser/parse_clause.c,v 1.154 2006/07/26 00:34:48 momjian Exp $
* $PostgreSQL: pgsql/src/backend/parser/parse_clause.c,v 1.155 2006/07/26 19:31:51 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -1074,9 +1074,12 @@ transformWhereClause(ParseState *pstate, Node *clause,
/*
* transformLimitClause -
* Transform the expression and make sure it is of type integer.
* Transform the expression and make sure it is of type bigint.
* Used for LIMIT and allied clauses.
*
* Note: as of Postgres 8.2, LIMIT expressions are expected to yield int8,
* rather than int4 as before.
*
* constructName does not affect the semantics, but is used in error messages
*/
Node *
@ -1090,7 +1093,7 @@ transformLimitClause(ParseState *pstate, Node *clause,
qual = transformExpr(pstate, clause);
qual = coerce_to_integer64(pstate, qual, constructName);
qual = coerce_to_bigint(pstate, qual, constructName);
/*
* LIMIT can't refer to any vars or aggregates of the current query; we