Trailing spaces in char or varchar fields

From: "Huy Do" <huy(at)travel(dot)com(dot)au>
To: "PostgreSQL-Novice" <pgsql-novice(at)postgreSQL(dot)org>
Subject: Trailing spaces in char or varchar fields
Date: 2001-01-05 00:38:13
Message-ID: NEBBIHDFCLBAILBDEADCIEDKCAAA.huy@travel.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi,

Is there a way to get postgres to keep the trailing spaces
in a field. I have an existing database which I am porting
to postgresql. This database allows fields to have trailing
spaces and many key fields have trailing spaces to distinguish
uniqueness (i know this is bad but it's legacy stuff).

When I dump my database and try to copy it into postgresql, it
complains about duplicate keys because postgres is trimming the
spaces.

Can anyone help ?

Thanks so much

Huy

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2001-01-05 01:26:11 Re: Trailing spaces in char or varchar fields
Previous Message Thomas SMETS 2001-01-05 00:35:04 Debugging ?