pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rob Tester <robtester@gmail.com>
To: pgsql-interfaces@postgresql.org
Subject: Help with returning a tuple
Date: Fri, 11 May 2007 18:34:20 -0700
Message-ID: <f5f60fb50705111834m40e8ce31o966d261ef66d9946@mail.gmail.com> (raw)

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.

Message-ID: <f5f60fb50705111834m40e8ce31o966d261ef66d9946@mail.gmail.com>
Permalink:  ../f5f60fb50705111834m40e8ce31o966d261ef66d9946@mail.gmail.com/
Also on:    postgresql.org/message-id/f5f60fb50705111834m40e8ce31o966d261ef66d9946@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: robtester@gmail.com
  Subject: Re: Help with returning a tuple
  In-Reply-To: <f5f60fb50705111834m40e8ce31o966d261ef66d9946@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox