mirror of
https://github.com/postgres/postgres.git
synced 2025-05-28 05:21:27 +03:00
textin fixed: no more zero-byte (thanks, Erich)
This commit is contained in:
parent
59bb41a235
commit
3677e86f7f
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/varlena.c,v 1.9 1997/01/08 08:38:59 bryanh Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/varlena.c,v 1.10 1997/01/16 03:53:51 vadim Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -165,7 +165,7 @@ textin(char *inputText)
|
||||
|
||||
if (inputText == NULL)
|
||||
return(NULL);
|
||||
len = strlen(inputText) + VARHDRSZ + 1;
|
||||
len = strlen(inputText) + VARHDRSZ;
|
||||
result = (struct varlena *) palloc(len);
|
||||
VARSIZE(result) = len;
|
||||
memmove(VARDATA(result), inputText, len - VARHDRSZ);
|
||||
|
Loading…
x
Reference in New Issue
Block a user