Thread: Bugs: fill value with cursor

Bugs: fill value with cursor

From
"Programmazione softsystem.it"
Date:
Hi,
Excuse my bad english.
The value of field created using insert into cursor or similar are filling with space ( "one" -> "one     "), this is not good and very different with another database windows.
This is a large block for using application windows with database for s.o. unix.
 
Hi.
 
Dbg
Soft System Srl - Pordenone
email: prog@softsystem.it
Attachment

Re: Bugs: fill value with cursor

From
"Dave Page"
Date:
Use varchar() columns instead of char() which is padded to the length you specify.
 
Regards, Dave.
-----Original Message-----
From: Programmazione softsystem.it [mailto:prog@softsystem.it]
Sent: 27 June 2002 16:06
To: pgsql-ODBC@postgresql.org
Subject: [ODBC] Bugs: fill value with cursor

Hi,
Excuse my bad english.
The value of field created using insert into cursor or similar are filling with space ( "one" -> "one     "), this is not good and very different with another database windows.
This is a large block for using application windows with database for s.o. unix.
 
Hi.
 
Dbg
Soft System Srl - Pordenone
email: prog@softsystem.it

Re: Bugs: fill value with cursor

From
Oskar Berggren
Date:
Programmazione softsystem.it wrote:
> Hi,
> Excuse my bad english.
> The value of field created using insert into cursor or similar are
> filling with space ( "one" -> "one     "), this is not good and very
> different with another database windows.
> This is a large block for using application windows with database for
> s.o. unix.

What are the datatype of the field? If it is char(X) PostgreSQL will
pad or truncate it so that it is always X characters long. Try using
varchar(X) (where X is maximum length) instead.

/Oskar

--
/-----------------------+---------------------------+------------------\
| SGS Datanätgrupp      | www.sgs.studenthem.gu.se  | Office Hours     |
| Utlandagatan 24       | E-mail: dng@sgs.o.se      |   Mon-Thur 17-19 |
| 412 80  Göteborg      | Phone:  031-7081335       |                  |
\-----------------------+---------------------------+------------------/