Re: String Concatenation

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Luiz K(dot) Matsumura" <luiz(at)planit(dot)com(dot)br>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: String Concatenation
Date: 2004-07-23 17:56:22
Message-ID: 26766.1090605382@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

"Luiz K. Matsumura" <luiz(at)planit(dot)com(dot)br> writes:
> My reasoning is wrong or this is a bug ?

This is a debatable issue. See the thread starting here:
http://archives.postgresql.org/pgsql-bugs/2004-07/msg00156.php
for some recent debate. (What is not brought out in that particular
thread is that our pre-7.4 behavior was also surprising, just in
different places. Trawling the archives for awhile may convince you
that 7.4 is better, or not.)

The bottom line in my mind is that the SQL spec's treatment of padding
space characters is very inconsistent, and so you're best off to use a
datatype that doesn't consider trailing spaces as special --- ie, use
varchar or text, and avoid char(n) like the plague.

regards, tom lane

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2004-07-23 18:00:11 Re: ERROR: pg_class_aclcheck: relation (OID) not found with SELECT INTO variable
Previous Message Stephan Szabo 2004-07-23 17:37:03 Re: ERROR: pg_class_aclcheck: relation (OID) not found