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

Re: PostgreSQL delete the blank in the end of the String automatically. how can I avoid it?

From: Jeff Eckermann <jeff_eckermann(at)yahoo(dot)com>
To: "pgsql-general (at) postgresql (dot) org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: PostgreSQL delete the blank in the end of the String automatically. how can I avoid it?
Date: 2004-05-28 19:46:06
Message-ID: 20040528194606.38576.qmail@web20802.mail.yahoo.com (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-novicepgsql-odbc
--- Paul Thomas <paul(at)tmsl(dot)demon(dot)co(dot)uk> wrote:
> 
> On 28/05/2004 13:04 xier(at)in(dot)tum(dot)de wrote:
> > hello,
> > 
> > my Name is Rong. I am student at TU-Munich. I have
> some questions for
> > Postgresql7.2  under SuSe Linux.
> > Postgresql7.2  under SuSe Linux8.0.
> > I use PostgreSQL7.2 with PGAdminII1.4.2 under
> Windows2000.
> > 
> > I insert a String from Teleform6.0 of Cardiff
> through ODBC in table of
> > PostgreSQL.
> > There should be some blank in the End of the
> String. e.g: "data
> >      "
> > But there ist no blank in the end of the String in
> the table. e.g: "data"
> > It means, that PostgreSQL delete the blank in the
> end of the String
> > automatically.
> > But I need the blank in the end of the String.
> > how can I avoid it?
> 
> AFAICT, it's not PostgreSQL which is causing your
> problem. I've just 
> tested against 7.2.1 using psql and it does _not_
> remove trailing spaces. 
> I think your problem is with your client code.

I had a thought that the ODBC driver could be
stripping the trailing spaces, but the test I just did
(using MS Access via ODBC) worked fine.

Thinking some more, I used a "text" type field for my
test.  I have some recollection that varchar(n) fields
_will_ strip trailing spaces.  But I'm too lazy to
test that right now.

> 
> HTH
> 
> BTW, 7.2 is very old. I'd recommend upgrading.
> 
> -- 
> Paul Thomas
>
+------------------------------+---------------------------------------------+
> | Thomas Micro Systems Limited | Software Solutions
> for 
> Business             |
> | Computer Consultants         | 
> http://www.thomas-micro-systems-ltd.co.uk   |
>
+------------------------------+---------------------------------------------+
> 
> ---------------------------(end of
> broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to
majordomo(at)postgresql(dot)org



	
		
__________________________________
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 

In response to

Responses

pgsql-novice by date

Next:From: Alain-Serge NagniDate: 2004-05-28 20:29:37
Subject: Re: Postgresql Novice problem
Previous:From: Tom LaneDate: 2004-05-28 17:02:17
Subject: Re: Error msgs from PostgreSQL server : specified item offset is too large, failed to add item to the page

pgsql-odbc by date

Next:From: Paul ThomasDate: 2004-05-29 08:58:56
Subject: Re: PostgreSQL delete the blank in the end of the String automatically. how can I avoid it?
Previous:From: Manuel SugawaraDate: 2004-05-28 15:58:44
Subject: Re: [NOVICE] PostgreSQL delete the blank in the end of the String automatically. how can I avoid it?

pgsql-general by date

Next:From: jarednevansDate: 2004-05-28 20:06:37
Subject: Re: Problem with public schema
Previous:From: Mark HarrisonDate: 2004-05-28 17:49:33
Subject: postgresql anonymous cvs?

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