mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-21 08:29:39 +08:00
Constlen can be -1, so make it a signed type.
This commit is contained in:
parent
7b30490bc9
commit
856da1e65a
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/nodes/makefuncs.c,v 1.7 1998/02/10 16:03:17 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/nodes/makefuncs.c,v 1.8 1998/02/21 16:58:22 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* Creator functions in POSTGRES 4.2 are generated automatically. Most of
|
||||
@ -102,7 +102,7 @@ makeResdom(AttrNumber resno,
|
||||
*/
|
||||
Const *
|
||||
makeConst(Oid consttype,
|
||||
Size constlen,
|
||||
int constlen,
|
||||
Datum constvalue,
|
||||
bool constisnull,
|
||||
bool constbyval,
|
||||
|
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.30 1998/02/13 03:27:45 vadim Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.31 1998/02/21 16:58:24 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* Every (plan) node in POSTGRES has an associated "out" routine which
|
||||
@ -629,7 +629,7 @@ _outResdom(StringInfo str, Resdom *node)
|
||||
char buf[500];
|
||||
|
||||
appendStringInfo(str, "RESDOM");
|
||||
sprintf(buf, " :resno %hd ", node->resno);
|
||||
sprintf(buf, " :resno %d ", node->resno);
|
||||
appendStringInfo(str, buf);
|
||||
sprintf(buf, " :restype %u ", node->restype);
|
||||
appendStringInfo(str, buf);
|
||||
@ -724,7 +724,7 @@ _outVar(StringInfo str, Var *node)
|
||||
appendStringInfo(str, "VAR");
|
||||
sprintf(buf, " :varno %d ", node->varno);
|
||||
appendStringInfo(str, buf);
|
||||
sprintf(buf, " :varattno %hd ", node->varattno);
|
||||
sprintf(buf, " :varattno %d ", node->varattno);
|
||||
appendStringInfo(str, buf);
|
||||
sprintf(buf, " :vartype %u ", node->vartype);
|
||||
appendStringInfo(str, buf);
|
||||
@ -749,7 +749,7 @@ _outConst(StringInfo str, Const *node)
|
||||
appendStringInfo(str, "CONST");
|
||||
sprintf(buf, " :consttype %u ", node->consttype);
|
||||
appendStringInfo(str, buf);
|
||||
sprintf(buf, " :constlen %hd ", node->constlen);
|
||||
sprintf(buf, " :constlen %d ", node->constlen);
|
||||
appendStringInfo(str, buf);
|
||||
appendStringInfo(str, " :constisnull ");
|
||||
appendStringInfo(str, node->constisnull ? "true" : "false");
|
||||
@ -931,7 +931,7 @@ _outParam(StringInfo str, Param *node)
|
||||
appendStringInfo(str, "PARAM");
|
||||
sprintf(buf, " :paramkind %d ", node->paramkind);
|
||||
appendStringInfo(str, buf);
|
||||
sprintf(buf, " :paramid %hd ", node->paramid);
|
||||
sprintf(buf, " :paramid %d ", node->paramid);
|
||||
appendStringInfo(str, buf);
|
||||
appendStringInfo(str, " :paramname ");
|
||||
appendStringInfo(str, node->paramname);
|
||||
|
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.25 1998/02/13 03:27:47 vadim Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.26 1998/02/21 16:58:26 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* Most of the read functions for plan nodes are tested. (In fact, they
|
||||
@ -947,7 +947,7 @@ _readConst()
|
||||
|
||||
token = lsptok(NULL, &length); /* get :constlen */
|
||||
token = lsptok(NULL, &length); /* now read it */
|
||||
local_node->constlen = strtoul(token,NULL,10);
|
||||
local_node->constlen = strtol(token,NULL,10);
|
||||
|
||||
token = lsptok(NULL, &length); /* get :constisnull */
|
||||
token = lsptok(NULL, &length); /* now read it */
|
||||
|
@ -6,7 +6,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: makefuncs.h,v 1.9 1998/02/10 16:04:24 momjian Exp $
|
||||
* $Id: makefuncs.h,v 1.10 1998/02/21 16:58:45 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -39,7 +39,7 @@ extern Resdom * makeResdom(AttrNumber resno,
|
||||
int resjunk);
|
||||
|
||||
extern Const * makeConst(Oid consttype,
|
||||
Size constlen,
|
||||
int constlen,
|
||||
Datum constvalue,
|
||||
bool constisnull,
|
||||
bool constbyval,
|
||||
|
@ -6,7 +6,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: primnodes.h,v 1.19 1998/02/13 03:45:29 vadim Exp $
|
||||
* $Id: primnodes.h,v 1.20 1998/02/21 16:58:49 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -181,7 +181,7 @@ typedef struct Const
|
||||
{
|
||||
NodeTag type;
|
||||
Oid consttype;
|
||||
Size constlen;
|
||||
int constlen;
|
||||
Datum constvalue;
|
||||
bool constisnull;
|
||||
bool constbyval;
|
||||
|
Loading…
Reference in New Issue
Block a user