diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2006-07-26 19:31:51 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2006-07-26 19:31:51 +0000 |
commit | a998a692475845e10ba12a24c5af44b22737bd50 (patch) | |
tree | d82a26dd427190e1492a2fb21ccfe85e16c7da39 /src/backend/parser/parse_clause.c | |
parent | 5ffa0bb47a3ca975f257d665e38f2ba89625e112 (diff) | |
download | postgresql-a998a692475845e10ba12a24c5af44b22737bd50.tar.gz postgresql-a998a692475845e10ba12a24c5af44b22737bd50.zip |
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'.
Diffstat (limited to 'src/backend/parser/parse_clause.c')
-rw-r--r-- | src/backend/parser/parse_clause.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/backend/parser/parse_clause.c b/src/backend/parser/parse_clause.c index 2b95722530a..d34529c74ee 100644 --- a/src/backend/parser/parse_clause.c +++ b/src/backend/parser/parse_clause.c @@ -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 |