D'Arcy J.M. Cain wrote:
> This was an unexpected difference between these two types and I wonder
> if it was meant to be this way. Previously, a char8 field with the
> string 'abc' would return 'abc' as expected. Now, with char(8), I get
> back 'abc ' instead. You can see this with my PygreSQL module
> or the C interface (which my module uses, of course.) This causes a
> lot of my programs to break.
char(x) is the datatype 'bpchar' (blank padded char). Thus it is padded
with spaces to the field width.
Couldn't you use something like "select rtrim(column) from table". This
will trim the spaces off.
In response to
pgsql-hackers by date
|Next:||From: Bruce Momjian||Date: 1998-05-14 14:55:34|
|Subject: Re: AW: [HACKERS] mmap and MAP_ANON|
|Previous:||From: Bruce Momjian||Date: 1998-05-14 14:54:09|
|Subject: Re: [HACKERS] Sequential scan speed, mmap, disk i/o|