pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kevin Brannen <kevinb@nurseamerica.net>
To: luis.felipe@unibase.com.mx
Cc: pgsql-admin@postgresql.org
Subject: Re: SqlServer to PostgreSql
Date: Wed, 10 Jul 2002 10:58:31 -0500
Message-ID: <3D2C59A7.5090304@nurseamerica.net> (raw)
References: <20020709191805531.AAA2276@mailserver.mvs.net.mx@there>

Luis Felipe Acevedo Fernandez wrote:
> Hi!
> I triyed to migrate a database from SqlServer to PostgreSql, but I have a 
> problem with char or varchar data types cos If I try to insert or select some 
> information from a table the program retrieve blank spaces, my program was 
> develop in PowerBuilder 7
> 
> Example If there is a table with a column char(5) and I insert the word "Hi" 
> with 2 character when the program try to retrieve the information 
> it gets "Hi   " 
> 
> thats my problem i hope some one  can help 

That is proper behavior for the "char" datatype.  Change your column to 
"varchar(5)" and you should get what you want--no padding with spaces.

HTH,
Kevin




view thread (3+ messages)  latest in thread

Message-ID: <3D2C59A7.5090304@nurseamerica.net>
Permalink:  ../3D2C59A7.5090304@nurseamerica.net/
Also on:    postgresql.org/message-id/3D2C59A7.5090304@nurseamerica.net

 · 

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-admin@postgresql.org
  Cc: kevinb@nurseamerica.net, luis.felipe@unibase.com.mx
  Subject: Re: SqlServer to PostgreSql
  In-Reply-To: <3D2C59A7.5090304@nurseamerica.net>
  References: <20020709191805531.AAA2276@mailserver.mvs.net.mx@there> <3D2C59A7.5090304@nurseamerica.net>

* 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