Date:

Mon Sep 18 11:04:32 PDT 1995

Description

The builtin type bytea was computing the size incorrectly on output.

Kudos to Chris Anderson (chris@clinton.toaster.ba.md.us) for finding the problem AND providing the fix!

Fix

Apply this patch.

===================================================================
RCS file: /usr/local/devel/pglite/cvs/src/backend/utils/adt/varlena.c,v
retrieving revision 1.5
diff -c -r1.5 varlena.c
*** 1.5	1995/06/02 20:36:02
--- src/backend/utils/adt/varlena.c	1995/09/14 18:32:46
***************
*** 123,129 ****
      }
      vp = vlena->vl_dat;
      len = 1;		/* empty string has 1 char */
!     for (i = vlena->vl_len - sizeof(int32); i != 0; i--)	/* varlena? */
  	if (*vp == '\\')
  	    len += 2;
  	else if (isascii(*vp) && isprint(*vp))
--- 123,129 ----
      }
      vp = vlena->vl_dat;
      len = 1;		/* empty string has 1 char */
!     for (i = vlena->vl_len - sizeof(int32); i != 0; i--, vp++)	/* varlena? */
  	if (*vp == '\\')
  	    len += 2;
  	else if (isascii(*vp) && isprint(*vp))