pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jeff Eckermann <jeff_eckermann@yahoo.com>
To: Paul Thomas <paul@tmsl.demon.co.uk>
To: pgsql-general @ postgresql . org <pgsql-general@postgresql.org>
Subject: Re: PostgreSQL delete the blank in the end of the String automatically. how can I avoid it?
Date: Sun, 30 May 2004 10:19:23 -0700 (PDT)
Message-ID: <20040530171923.67166.qmail@web20807.mail.yahoo.com> (raw)
In-Reply-To: <20040529095856.A16618@bacon>

--- Paul Thomas <paul@tmsl.demon.co.uk> wrote:
> 
> On 28/05/2004 20:46 Jeff Eckermann wrote:
> > 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.
> 
> But that's using a different ODBC driver so won't
> show a possible bug in 
> the PG driver.

PgAdminII uses the psqlodbc driver.  It's pgAdminIII
that does not.

> 
> > 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.
> 
> I was testing using a varchar(n) field.

Which I just tested, and found to work fine.  My
recollection of the space-stripping behaviour of
varchar(n) appears to be off.

All of which is academic, seeing that the OP solved
his problem by using char(n).  But that leaves wide
open the question of why that would work, when
varchar(n) or text do not.

> 
> -- 
> Paul Thomas
>
+------------------------------+---------------------------------------------+
> | Thomas Micro Systems Limited | Software Solutions
> for 
> Business             |
> | Computer Consultants         | 
> http://www.thomas-micro-systems-ltd.co.uk   |
>
+------------------------------+---------------------------------------------+
> 
> ---------------------------(end of
> broadcast)---------------------------
> TIP 4: Don't 'kill -9' the
> postmaster-------------------(end of
> broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster



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



view thread (8+ messages)

Message-ID: <20040530171923.67166.qmail@web20807.mail.yahoo.com>
Permalink:  ../20040530171923.67166.qmail@web20807.mail.yahoo.com/
Also on:    postgresql.org/message-id/20040530171923.67166.qmail@web20807.mail.yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: jeff_eckermann@yahoo.com, paul@tmsl.demon.co.uk, pgsql-general@postgresql.org
  Subject: Re: PostgreSQL delete the blank in the end of the String automatically. how can I avoid it?
  In-Reply-To: <20040530171923.67166.qmail@web20807.mail.yahoo.com>
  References: <20040529095856.A16618@bacon> <20040530171923.67166.qmail@web20807.mail.yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox