Return-Path: owner-postman
Received: from localhost.Berkeley.EDU (localhost.Berkeley.EDU [127.0.0.1]) by nobozo.CS.Berkeley.EDU (8.6.9/8.6.3) with SMTP id DAA19121 for postgres-redist; Tue, 29 Nov 1994 03:48:45 -0800
Resent-From: POSTGRES mailing list <postman@postgres.Berkeley.EDU>
Resent-Message-Id: <199411291148.DAA19121@nobozo.CS.Berkeley.EDU>
Sender: owner-postman@postgres.Berkeley.EDU
X-Return-Path: owner-postman
Received: from faerie.CS.Berkeley.EDU (faerie.CS.Berkeley.EDU [128.32.37.53]) by nobozo.CS.Berkeley.EDU (8.6.9/8.6.3) with ESMTP id DAA19111 for <postgres@postgres.Berkeley.EDU>; Tue, 29 Nov 1994 03:48:44 -0800
Received: from localhost.Berkeley.EDU (localhost.Berkeley.EDU [127.0.0.1]) by faerie.CS.Berkeley.EDU (8.6.9/8.1B) with SMTP id DAA19763; Tue, 29 Nov 1994 03:47:16 -0800
Message-Id: <199411291147.DAA19763@faerie.CS.Berkeley.EDU>
X-Authentication-Warning: faerie.CS.Berkeley.EDU: Host localhost.Berkeley.EDU didn't use HELO protocol
From: aoki@cs.berkeley.edu (Paul M. Aoki)
To: gatto@dss.inpe.br (Gatto)
Cc: postgres@postgres.Berkeley.EDU
Subject: Re: bytea built-in type 
Reply-To: aoki@cs.berkeley.edu (Paul M. Aoki)
In-reply-to: Your message of Tue, 29 Nov 94 09:21:37 EDT 
	     <9411291121.AA05008@dss.inpe.br> 
Date: Tue, 29 Nov 94 03:47:10 -0800
X-Sender: aoki@postgres.Berkeley.EDU
Resent-To: postgres-redist@postgres.Berkeley.EDU
X-Mts: smtp
Resent-Date: Tue, 29 Nov 94 03:48:45 -0800
Resent-XMts: smtp

gatto@dss.inpe.br (Gatto) writes:
> I have class MSG with a bytea (variable length array of bytes) field, and 
> I need to add instances to it trough a C source code using LIBPQ functions. 
> This field can contain zero values, and I don't know how to build a query 
> string, to use in PQexec, that doesn't finish when a zero value occours in
> some position (not the last) of this field. 

the base variable-length types (bytea, text) are implemented in 
src/backend/utils/adt/varlena.c.

it looks like bytea takes constants of the form \xxx where xxx is an
octal constant and must have exactly three digits.
--
  Paul M. Aoki          |  University of California at Berkeley
  aoki@CS.Berkeley.EDU  |  Dept. of EECS, Computer Science Division (#1776) 
                        |  Berkeley, CA 94720-1776

==============================================================================
   To add/remove yourself to/from the POSTGRES mailing list: send mail with 
   the subject line ADD or DEL to "postgres-request@postgres.Berkeley.EDU".
   If this fails, send mail to "post_questions@postgres.Berkeley.EDU" and
   a human will deal with it.  DO NOT post to the "postgres" mailing list.
==============================================================================
              URL: http://s2k-ftp.CS.Berkeley.EDU:8000/postgres/
[s2k-ftp is down with hardware problems.  more news as it becomes available..]
