*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/varchar.c,v 1.21 1998/01/08 04:19:16 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/varchar.c,v 1.22 1998/01/08 04:58:19 momjian Exp $
*
*-------------------------------------------------------------------------
*/
if (s == NULL)
return ((char *) NULL);
- if (typlen == -1) /* we will remove this soon to make compact storage */
- /* change varcharlen at the same time to use VARSIZE */
- len = strlen(s) + VARHDRSZ;
-/* if (typlen != -1 && len > typlen) */
- else
+ len = strlen(s) + VARHDRSZ;
+ if (typlen != -1 && len > typlen)
len = typlen; /* clip the string at max length */
if (len > 4096)