mirror of
https://github.com/postgres/postgres.git
synced 2025-05-12 16:21:30 +03:00
Re-install working varchar() with compress size.
This commit is contained in:
parent
5fe090c559
commit
84ef6aae18
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* 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)
|
if (s == NULL)
|
||||||
return ((char *) NULL);
|
return ((char *) NULL);
|
||||||
|
|
||||||
if (typlen == -1) /* we will remove this soon to make compact storage */
|
len = strlen(s) + VARHDRSZ;
|
||||||
/* change varcharlen at the same time to use VARSIZE */
|
if (typlen != -1 && len > typlen)
|
||||||
len = strlen(s) + VARHDRSZ;
|
|
||||||
/* if (typlen != -1 && len > typlen) */
|
|
||||||
else
|
|
||||||
len = typlen; /* clip the string at max length */
|
len = typlen; /* clip the string at max length */
|
||||||
|
|
||||||
if (len > 4096)
|
if (len > 4096)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user