Trouble returning a text field from an SRF

From: "Rob Tester" <robtester(at)gmail(dot)com>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: Trouble returning a text field from an SRF
Date: 2007-05-12 15:26:22
Message-ID: f5f60fb50705120826q7e08c426offc9268bb776e8b6@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

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.

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Alvaro Herrera 2007-05-13 18:11:54 Re: Trouble returning a text field from an SRF
Previous Message Michael Meskes 2007-05-12 11:35:35 Re: PQprepare question