Return-Path: postman 
Delivery-Date: Wed, 25 Aug 93 01:12:22 PDT
Return-Path: postman
Received: by postgres.Berkeley.EDU (5.61/1.29)
	id AA14415; Wed, 25 Aug 93 01:05:39 -0700
Resent-From: postman (POSTGRES mailing list)
Resent-Message-Id: <9308250805.AA14415@postgres.Berkeley.EDU>
Sender: owner-postman@postgres.Berkeley.EDU
X-Return-Path: avi@postgres.Berkeley.EDU
Received: from gaia.CS.Berkeley.EDU by postgres.Berkeley.EDU (5.61/1.29)
	id AA14407; Wed, 25 Aug 93 01:05:33 -0700
Received: from localhost (avi@localhost) by gaia.CS.Berkeley.EDU (8.1C/8.1B) id BAA24965; Wed, 25 Aug 1993 01:14:32 -0700
Date: Wed, 25 Aug 1993 01:14:32 -0700
From: Avi Pfeffer <avi@postgres.Berkeley.EDU>
Message-Id: <199308250814.BAA24965@gaia.CS.Berkeley.EDU>
To: jaws@pangaea.dme.nt.gov.au, postgres@postgres.berkeley.edu
Subject: Re:  text type
Resent-To: postgres-dist
Resent-Date: Wed, 25 Aug 93 01:05:37 PDT

jaws@pangaea.dme.nt.gov.au (James Woods) writes :
> I have a user defined function written in C which takes an argument of
> type text.  When the backend passes this argument in, is the string
> that is passed in NULL terminated?  I have a feeling that it doesn't as
> my function appears to be producing data with garbage on the and of the
> strings.

> If it is not NULL terminated what is the correct way to create a NULL
> terminated string out of it so that I can use the normal str functions
> on it?

Type text is NOT a null-terminated string.  To convert it to one use
textout.

avi
