*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/common/indextuple.c,v 1.24 1998/02/04 21:32:09 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/common/indextuple.c,v 1.25 1998/02/05 17:22:23 momjian Exp $
*
*-------------------------------------------------------------------------
*/
while (att[j]->attcacheoff > 0)
j++;
- if (!VARLENA_FIXED_SIZE(att[j]))
+ if (!VARLENA_FIXED_SIZE(att[j-1]))
off = att[j - 1]->attcacheoff + att[j - 1]->attlen;
else
off = att[j - 1]->attcacheoff + att[j - 1]->atttypmod;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.15 1998/02/03 01:53:16 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.16 1998/02/05 17:22:29 momjian Exp $
*
*-------------------------------------------------------------------------
*/
Value *val = &con->val;
if (con->typename != NULL)
- result = parser_typecast(val, con->typename, -1);
+ result = parser_typecast(val, con->typename, 0);
else
result = (Node *) make_const(val);
break;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/varchar.c,v 1.24 1998/01/16 23:20:34 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/varchar.c,v 1.25 1998/02/05 17:22:41 momjian Exp $
*
*-------------------------------------------------------------------------
*/
if (s == NULL)
return ((char *) NULL);
- if (atttypmod == -1)
+ if (atttypmod < 1)
{
/*
return ((char *) NULL);
len = strlen(s) + VARHDRSZ;
- if (atttypmod != -1 && len > atttypmod)
+ if (atttypmod > 0 && len > atttypmod)
len = atttypmod; /* clip the string at max length */
if (len > 4096)