Re: How to concat strings so that trailing spaces remain

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Andrus" <eetasoft(at)online(dot)ee>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How to concat strings so that trailing spaces remain
Date: 2006-03-30 19:00:11
Message-ID: 16761.1143745211@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Andrus" <eetasoft(at)online(dot)ee> writes:
> I have where clause where all fields are CHAR(10) type and may have trailing
> spaces.
> ...
> Correct result is produced if || operator does not remove trailing spaces.

If you think that trailing spaces are significant data, you should
probably be using VARCHAR not CHAR datatype.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Martijn van Oosterhout 2006-03-30 19:42:37 Re: User defined data type
Previous Message Don Y 2006-03-30 18:51:41 User defined data type