Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 08B5C9FB4DB for ; Fri, 11 May 2007 22:34:26 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 08528-02-2 for ; Fri, 11 May 2007 22:34:22 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.234]) by postgresql.org (Postfix) with ESMTP id 8DC3F9FB4DE for ; Fri, 11 May 2007 22:34:22 -0300 (ADT) Received: by nz-out-0506.google.com with SMTP id s1so1223040nze for ; Fri, 11 May 2007 18:34:21 -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=os+/fsQr6KH8w5Fab1kO00XvPT74RdopfQSC5Su176Rm+8upkAPCWw4p7XWmyvLloQlFhL7j1sLbSehpTa2Ko0eH3G7vFePsNaHmArDOn+zUpYcjEhTc29uvjdJRFIxLM+sguQq79/jYfu4FfeC2KUCNwafmiy1MIReaFIoN9g4= 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=sJtqDxplzej6BORvSbx0U2/H4skGXzhexdbu+Immxj4zEn7fPr7789hK+nle4y4/KPAqZo9oxj4WnT5xttzxaHLo1bqeaTpRz/1acaKXXF35WCUdhACBuJnPF2TZ/eiewMVD7tgTVy11U9WGdAkLmVV6wKoGjTtKJOnJMtcO1oU= Received: by 10.65.138.4 with SMTP id q4mr5614255qbn.1178933661008; Fri, 11 May 2007 18:34:21 -0700 (PDT) Received: by 10.65.192.7 with HTTP; Fri, 11 May 2007 18:34:20 -0700 (PDT) Message-ID: Date: Fri, 11 May 2007 18:34:20 -0700 From: "Rob Tester" To: pgsql-interfaces@postgresql.org Subject: Help with returning a tuple MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_54374_3052840.1178933660946" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/22 X-Sequence-Number: 6529 ------=_Part_54374_3052840.1178933660946 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_54374_3052840.1178933660946 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_54374_3052840.1178933660946--