Skip site navigation (1) Skip section navigation (2)

Re: character and text comparison

From: Jacek Rembisz <jr178783(at)zodiac(dot)mimuw(dot)edu(dot)pl>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Re: character and text comparison
Date: 2004-09-15 17:49:47
Message-ID: 20040915174947.GA7646@melina.szuwary.org (view raw or flat)
Thread:
Lists: pgsql-bugs
On Wed, Sep 15, 2004 at 12:43:11PM -0400, Tom Lane wrote:
> Jacek Rembisz <jr178783(at)zodiac(dot)mimuw(dot)edu(dot)pl> writes:
> > When I run  SELECT ' '::character = ' '::text;
> > on PostgreSQL 7.4 the result is `false' 
> > while on 7.3 and 7.2 instalations result is `true'
> 
> > Is this an intentional change?
> 
> Yes.
> 
> We now strip trailing blanks when converting a char(n) value to text.
 
Thank you for a quick answer.

I have changed my application to use text type instead of character type.

best regards,
Jacek Rembisz

In response to

pgsql-bugs by date

Next:From: Tom LaneDate: 2004-09-15 18:07:10
Subject: Re: BUG #1252: Optimization of SELECT for NOT NULL case
Previous:From: Bruno Wolff IIIDate: 2004-09-15 17:21:54
Subject: Re: BUG #1252: Optimization of SELECT for NOT NULL case

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group