]> granicus.if.org Git - postgresql/commitdiff
Constlen can be -1, so make it a signed type.
authorBruce Momjian <bruce@momjian.us>
Sat, 21 Feb 1998 16:58:49 +0000 (16:58 +0000)
committerBruce Momjian <bruce@momjian.us>
Sat, 21 Feb 1998 16:58:49 +0000 (16:58 +0000)
src/backend/nodes/makefuncs.c
src/backend/nodes/outfuncs.c
src/backend/nodes/readfuncs.c
src/include/nodes/makefuncs.h
src/include/nodes/primnodes.h

index 638e89cd3ac72605c94b5b03d853d97fd67b828c..4dbdea460e177ea4f9526620801ff01527a46172 100644 (file)
@@ -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,
index 46fd37cd7f342696402abf4d512340e5cd03210a..e65cc38c84c748ba7088f3f74681b63383b3fac8 100644 (file)
@@ -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);
index 279463312e81a3da72c69726a35be0fde1dd012d..323b1f1e21ddf243e5902d72d373435f0d43d956 100644 (file)
@@ -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 */
index 6fefdce5f39b9b00c3cd54b8f9e3412cd1aa228c..569c70f15db2553b64dbdd2f31faa2aa21618564 100644 (file)
@@ -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,
index a16e2ee4c08b01d3a51486619b3a64ae50f898c7..e49d78987160a1dde45c80691c66c78364883724 100644 (file)
@@ -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;