Commit 856da1e6 authored by Bruce Momjian's avatar Bruce Momjian

Constlen can be -1, so make it a signed type.

parent 7b30490b
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * 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 * NOTES
* Creator functions in POSTGRES 4.2 are generated automatically. Most of * Creator functions in POSTGRES 4.2 are generated automatically. Most of
...@@ -102,7 +102,7 @@ makeResdom(AttrNumber resno, ...@@ -102,7 +102,7 @@ makeResdom(AttrNumber resno,
*/ */
Const * Const *
makeConst(Oid consttype, makeConst(Oid consttype,
Size constlen, int constlen,
Datum constvalue, Datum constvalue,
bool constisnull, bool constisnull,
bool constbyval, bool constbyval,
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * 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 * NOTES
* Every (plan) node in POSTGRES has an associated "out" routine which * Every (plan) node in POSTGRES has an associated "out" routine which
...@@ -629,7 +629,7 @@ _outResdom(StringInfo str, Resdom *node) ...@@ -629,7 +629,7 @@ _outResdom(StringInfo str, Resdom *node)
char buf[500]; char buf[500];
appendStringInfo(str, "RESDOM"); appendStringInfo(str, "RESDOM");
sprintf(buf, " :resno %hd ", node->resno); sprintf(buf, " :resno %d ", node->resno);
appendStringInfo(str, buf); appendStringInfo(str, buf);
sprintf(buf, " :restype %u ", node->restype); sprintf(buf, " :restype %u ", node->restype);
appendStringInfo(str, buf); appendStringInfo(str, buf);
...@@ -724,7 +724,7 @@ _outVar(StringInfo str, Var *node) ...@@ -724,7 +724,7 @@ _outVar(StringInfo str, Var *node)
appendStringInfo(str, "VAR"); appendStringInfo(str, "VAR");
sprintf(buf, " :varno %d ", node->varno); sprintf(buf, " :varno %d ", node->varno);
appendStringInfo(str, buf); appendStringInfo(str, buf);
sprintf(buf, " :varattno %hd ", node->varattno); sprintf(buf, " :varattno %d ", node->varattno);
appendStringInfo(str, buf); appendStringInfo(str, buf);
sprintf(buf, " :vartype %u ", node->vartype); sprintf(buf, " :vartype %u ", node->vartype);
appendStringInfo(str, buf); appendStringInfo(str, buf);
...@@ -749,7 +749,7 @@ _outConst(StringInfo str, Const *node) ...@@ -749,7 +749,7 @@ _outConst(StringInfo str, Const *node)
appendStringInfo(str, "CONST"); appendStringInfo(str, "CONST");
sprintf(buf, " :consttype %u ", node->consttype); sprintf(buf, " :consttype %u ", node->consttype);
appendStringInfo(str, buf); appendStringInfo(str, buf);
sprintf(buf, " :constlen %hd ", node->constlen); sprintf(buf, " :constlen %d ", node->constlen);
appendStringInfo(str, buf); appendStringInfo(str, buf);
appendStringInfo(str, " :constisnull "); appendStringInfo(str, " :constisnull ");
appendStringInfo(str, node->constisnull ? "true" : "false"); appendStringInfo(str, node->constisnull ? "true" : "false");
...@@ -931,7 +931,7 @@ _outParam(StringInfo str, Param *node) ...@@ -931,7 +931,7 @@ _outParam(StringInfo str, Param *node)
appendStringInfo(str, "PARAM"); appendStringInfo(str, "PARAM");
sprintf(buf, " :paramkind %d ", node->paramkind); sprintf(buf, " :paramkind %d ", node->paramkind);
appendStringInfo(str, buf); appendStringInfo(str, buf);
sprintf(buf, " :paramid %hd ", node->paramid); sprintf(buf, " :paramid %d ", node->paramid);
appendStringInfo(str, buf); appendStringInfo(str, buf);
appendStringInfo(str, " :paramname "); appendStringInfo(str, " :paramname ");
appendStringInfo(str, node->paramname); appendStringInfo(str, node->paramname);
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * 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 * NOTES
* Most of the read functions for plan nodes are tested. (In fact, they * Most of the read functions for plan nodes are tested. (In fact, they
...@@ -947,7 +947,7 @@ _readConst() ...@@ -947,7 +947,7 @@ _readConst()
token = lsptok(NULL, &length); /* get :constlen */ token = lsptok(NULL, &length); /* get :constlen */
token = lsptok(NULL, &length); /* now read it */ 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); /* get :constisnull */
token = lsptok(NULL, &length); /* now read it */ token = lsptok(NULL, &length); /* now read it */
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* *
* Copyright (c) 1994, Regents of the University of California * 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, ...@@ -39,7 +39,7 @@ extern Resdom * makeResdom(AttrNumber resno,
int resjunk); int resjunk);
extern Const * makeConst(Oid consttype, extern Const * makeConst(Oid consttype,
Size constlen, int constlen,
Datum constvalue, Datum constvalue,
bool constisnull, bool constisnull,
bool constbyval, bool constbyval,
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* *
* Copyright (c) 1994, Regents of the University of California * 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 ...@@ -181,7 +181,7 @@ typedef struct Const
{ {
NodeTag type; NodeTag type;
Oid consttype; Oid consttype;
Size constlen; int constlen;
Datum constvalue; Datum constvalue;
bool constisnull; bool constisnull;
bool constbyval; bool constbyval;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment