X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 47496D1CAFD for ; Fri, 28 May 2004 17:41:51 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 16535-07 for ; Fri, 28 May 2004 17:41:46 -0300 (ADT) Received: from web20802.mail.yahoo.com (web20802.mail.yahoo.com [216.136.226.191]) by svr1.postgresql.org (Postfix) with SMTP id 867F3D1E996 for ; Fri, 28 May 2004 16:46:06 -0300 (ADT) Message-ID: <20040528194606.38576.qmail@web20802.mail.yahoo.com> Received: from [24.248.12.72] by web20802.mail.yahoo.com via HTTP; Fri, 28 May 2004 12:46:06 PDT Date: Fri, 28 May 2004 12:46:06 -0700 (PDT) From: Jeff Eckermann Subject: Re: PostgreSQL delete the blank in the end of the String automatically. how can I avoid it? To: "pgsql-general @ postgresql . org" In-Reply-To: <20040528143920.A14794@bacon> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200405/865 X-Sequence-Number: 61299 --- Paul Thomas wrote: > > On 28/05/2004 13:04 xier@in.tum.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@postgresql.org __________________________________ Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/