Subject: Re: text type

From: mick <[email-masked]>
Date: Tue, 31 Aug 93 16:07:21 BST

> From: Avi Pfeffer <[email-masked]>
> To: [email-masked], [email-masked]
> Subject: Re: text type
> Resent-To: [email-masked]
> Resent-Date: Wed, 25 Aug 93 01:05:37 PDT
> Content-Length: 591
> 
> [email-masked] (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
> 

Ive been using byteaout rather than textout.
This came from a similar problem to James Woods', I think I just
grepped through the source code to find that text was a varlena
and then found byteaout as a text to char * converter.
Is textout to be be preferred/likely to be more stable over future
releases ? And should it have been obvious where to find the information ?

Mick Ridley                    Dept of Computing
                               Phoenix Bldg
[email-masked]      Univ of Bradford
                               Bradford BD7 1DP
0274 383946                    UK