Received: from sss.pgh.pa.us (sss.pgh.pa.us [209.114.132.154]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f1NMCnx14279 for ; Fri, 23 Feb 2001 17:12:49 -0500 (EST) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.1/8.11.1) with ESMTP id f1NMCY900853; Fri, 23 Feb 2001 17:12:35 -0500 (EST) To: "Scott Muir" cc: pgsql-interfaces@postgresql.org Subject: Re: SPI - couple things (7.0.2) In-reply-to: References: Comments: In-reply-to "Scott Muir" message dated "Fri, 23 Feb 2001 14:23:38 -0700" Date: Fri, 23 Feb 2001 17:12:34 -0500 Message-ID: <850.982966354@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200102/168 X-Sequence-Number: 1132 "Scott Muir" writes: > Last night, I attempted to access the data of several TEXT parameters into a > 'language 'C'' function I've created and got an interesting result... on of > the strings gets a little garbled on the end... I haven't attempted to > debug it yet (isoloate the behaviour; gave up; went home) but I"m wondering > if it can be assumed that the (char *) part of the TEXT struct (VARDATA) has > been terminated at the length specified by the (VARLEN())?? part. TEXT data is guaranteed *not* to be null terminated. If you are writing code that expects it to be, you will have lots of problems. regards, tom lane