Skip site navigation (1) Skip section navigation (2)

Re: Trouble returning a text field from an SRF

From: "Rob Tester" <robtester(at)gmail(dot)com>
To: "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "'Alvaro Herrera'" <alvherre(at)commandprompt(dot)com>,<pgsql-interfaces(at)postgresql(dot)org>
Subject: Re: Trouble returning a text field from an SRF
Date: 2007-05-14 21:23:41
Message-ID: 07ed01c7966e$308ffc20$91aff460$@com (view raw or flat)
Thread:
Lists: pgsql-interfaces
Hmm..

wktStr was the original variable name from the code, I changed it to be more
'readable' for the question I was presenting (probably not a good idea in
hindsight). The length calculation has been changed as well and what I
presented would be a few bytes short. 

I have tried this using pgadmin3 (v1.6.1) and npgsql with the same results,
no data returned in the text field when the data goes over 65535 chars.
Maybe both clients are incorrectly setting a limit on a text field?


Rob.

-----Original Message-----
From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us] 
Sent: Monday, May 14, 2007 2:01 PM
To: Rob Tester
Cc: 'Alvaro Herrera'; pgsql-interfaces(at)postgresql(dot)org
Subject: Re: [INTERFACES] Trouble returning a text field from an SRF 

"Rob Tester" <robtester(at)gmail(dot)com> writes:
> I created my tuple that way and set the Datum using
> DirectFunctionCall1(...), but there still seems to be a limitation at
65535
> chars for the data. When my string is 65535 (or shorter) I get the text
> back. When it is longer I get nothing for the string, but the rest of the
> tuple is intact.

Maybe the problem is on the client side?  There's no visible restriction
in the code you quoted (though I am wondering a bit about what "wktStr"
is, and whether you've computed the required size of textOut correctly).

			regards, tom lane


In response to

Responses

pgsql-interfaces by date

Next:From: Gregory StarkDate: 2007-05-14 23:30:17
Subject: Re: Trouble returning a text field from an SRF
Previous:From: Tom LaneDate: 2007-05-14 21:00:36
Subject: Re: Trouble returning a text field from an SRF

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group