Re: Returning a long string (varchar from a function)

From: "Oisin Glynn" <me(at)oisinglynn(dot)com>
To: "Michael Fuhr" <mike(at)fuhr(dot)org>
Cc: <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Returning a long string (varchar from a function)
Date: 2005-02-09 18:48:19
Message-ID: 000501c50ed7$efafa3b0$a974fea9@homisco.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

My application was using ODBC from Windows server to Postgres 8.0.0 beta5 on
Windows I used the pgAdminIII SQL tool for my tests. Which failed and still
fail.

I just ran a test in psql and it works fine!!! Is this a possible issue in
the odbc driver? How does the SQL tool with pgAdminIII work?

I just found a max varchar len 254 in odbc driver settings I set this to
1000 but it did not make any difference.

I then discovered a similar restriction in my app and have fixed it.

Is there any downside to doing this?

Should the sql tool in pgAdminIII return the whole thing?

I was not aware of the string function you pointed out, thank you very much.

Oisin
----- Original Message -----
From: "Michael Fuhr" <mike(at)fuhr(dot)org>
To: "Oisin Glynn" <me(at)oisinglynn(dot)com>
Cc: <pgsql-novice(at)postgresql(dot)org>
Sent: Wednesday, February 09, 2005 12:51
Subject: Re: [NOVICE] Returning a long string (varchar from a function)

> On Wed, Feb 09, 2005 at 12:30:51PM -0500, Oisin Glynn wrote:
> >
> > select * from zfunc_test(254);
> > Gets chopped off to '...aaaa25'
>
> I couldn't duplicate this problem -- I get the entire string. Maybe
> your client is truncating the value -- how are you communicating
> with the database?
>
> Regarding what your function does, are you familiar with the repeat()
> function described in the "String Functions and Operators"
> documentation?
>
> http://www.postgresql.org/docs/8.0/static/functions-string.html
>
> SELECT repeat('a', 10);
> repeat
> ------------
> aaaaaaaaaa
> (1 row)
>
> --
> Michael Fuhr
> http://www.fuhr.org/~mfuhr/
>
>

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Michael Fuhr 2005-02-10 05:22:37 Re: how to know this row has been referenced or not????
Previous Message Devrim GUNDUZ 2005-02-09 18:24:13 Re: pg_hba.cong edit