From: Bruce Momjian Date: Thu, 8 Jan 1998 04:58:19 +0000 (+0000) Subject: Re-install working varchar() with compress size. X-Git-Tag: REL6_3~389 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=84ef6aae18ab30ce0a1baec15962688216ccbbf1;p=postgresql Re-install working varchar() with compress size. --- diff --git a/src/backend/utils/adt/varchar.c b/src/backend/utils/adt/varchar.c index 16ed0ea93e..3696661f15 100644 --- a/src/backend/utils/adt/varchar.c +++ b/src/backend/utils/adt/varchar.c @@ -7,7 +7,7 @@ * * * 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 $ * *------------------------------------------------------------------------- */ @@ -132,11 +132,8 @@ varcharin(char *s, int dummy, int typlen) 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)