Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id DFFFA9FB6F8 for ; Sat, 12 May 2007 12:26:28 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 21084-05 for ; Sat, 12 May 2007 12:26:23 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.178]) by postgresql.org (Postfix) with ESMTP id 9D6559FB69F for ; Sat, 12 May 2007 12:26:23 -0300 (ADT) Received: by py-out-1112.google.com with SMTP id a73so1084739pye for ; Sat, 12 May 2007 08:26:22 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; b=n4gKNjLbqRjExrEbEsRnX1AQW3xulOObfEwT2l7vCOe/uBtiC3Vu+kR8Fa9OWI9ptmmyqs4a4z2F+0ssREKYSvvZEx3r9ZsgXfvBhB9Rc1lmhQLp4JWIMbBB8E8LO0Da+H7ZOxRR0OO2235B88dKd7/6Ydlh4tJJuyRY5Sc3AqU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type; b=JPErZkldr9ZszWFGYW79lOmGuzdZJ29NuRHIzLnxQF4Vi3OL2BHZbQTLR+QigBhWVJkqHJZ5rM1qPPwp42U4juPfLn6axx8Br6OJWdRW4G9iUzz+/WQUBI6H2ZRLPV7A2xJKlD7Bv4zYHJffew4GqY0qbjOOTpHQ8F1c60j3xJI= Received: by 10.64.21.6 with SMTP id 6mr4980119qbu.1178983582498; Sat, 12 May 2007 08:26:22 -0700 (PDT) Received: by 10.65.192.7 with HTTP; Sat, 12 May 2007 08:26:22 -0700 (PDT) Message-ID: Date: Sat, 12 May 2007 08:26:22 -0700 From: "Rob Tester" To: pgsql-interfaces@postgresql.org Subject: Trouble returning a text field from an SRF MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_55656_26754013.1178983582449" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/20 X-Sequence-Number: 6527 ------=_Part_55656_26754013.1178983582449 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline I have written several postgres extensions in the past. However,currently I am having difficulty with an extension returning a tuple. Basically I want to return a tuple containing an integer and a very large variable length string. I created a type on Postgres that contains two fields (int4 and text). Originally, I was using buildTupleFromCStrings(). My function works fine and everything is cool, until my string becomes large. At that point NULL is returned in my tuple (I believe that this is because Postgres is using char type conversion on the string). So, my question is how can I return the large string as part of my tuple? Is there a Datum function that will allow me to convert a text* into a datum? Any help or a push in the right direction would be appreciated. Thanks, Rob. ------=_Part_55656_26754013.1178983582449 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
I have written several postgres extensions in the past. However,currently I am having difficulty with an extension returning a tuple. Basically I want to return a tuple containing an integer and a very large variable length string. I created a type on Postgres that contains two fields (int4 and text). Originally, I was using buildTupleFromCStrings(). My function works fine and everything is cool, until my string becomes large. At that point NULL is returned in my tuple (I believe that this is because Postgres is using char type conversion on the string). So, my question is how can I return the large string as part of my tuple? Is there a Datum function that will allow me to convert a text* into a datum?  Any help or a push in the right direction would be appreciated.

Thanks,

Rob.  
------=_Part_55656_26754013.1178983582449--