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

R: Fault when return strings over 256 characters in PLpgSQL

From: "Burn !" <ml(at)i3fighters(dot)com>
To: <pgsql-bugs(at)postgresql(dot)org>
Cc: <cathy(dot)hemsley(at)powerconv(dot)alstom(dot)com>
Subject: R: Fault when return strings over 256 characters in PLpgSQL
Date: 2005-03-10 08:43:58
Message-ID: 001a01c5254d$4d4fc4b0$5f733452@burn (view raw, whole thread or download thread mbox)
Thread:
Lists: pgsql-bugs
It could be a pgAdmin III presentation fault.
I'm using PostgreSQL 8.0.0 on Windows 2k and I've got the same problem
but only when inquiring via pgAdmin, using psql from command line all
goes ok. I think that the resulting string are correct, that's why the
function "position(\'.\' in userName);" doesn't find the dot.

Matteo Brusamolin


cathy(dot)hemsley(at)powerconv(dot)alstom(dot)com wrote:
> I have a PLpgSQL function that returns a string (varchar):  if this 
> string
> is over 256 characters long then the last three characters are
corrupted: 
> replaced by the string ' (.'

I'm skeptical: there is nothing special about 256 characters as far as 
the varchar implementation is concerned, nor is the string ' (.' of any 
significance.

Running your function (albeit on Linux) yields:

neilc=# select testconverttousername();
 
                                                 testconverttousername 
 

------------------------------------------------------------------------
------------------------------------------------------------------------
------------------------------------------------------------------------
--------------------------------------------
 
123456781234567812345678123456781234567812345678123456781234567812345678
123456781234567812345678123456781234567812345678123456781234567812345678
123456781234567812345678123456781234567812345678123456781234567812345678
123456781234567812345678123456781234567888
(1 row)

i.e. what one would expect.

-Neil

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq



In response to

pgsql-bugs by date

Next:From: cathy.hemsleyDate: 2005-03-10 08:45:01
Subject: Re: R: Fault when return strings over 256 characters in PLpgSQL
Previous:From: Mark ShewmakerDate: 2005-03-10 05:20:06
Subject: Re: We are not following the spec for HAVING without GROUP

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