dbTalk Databases Forums  

[BUGS] character and text comparison

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] character and text comparison in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Jacek Rembisz
 
Posts: n/a

Default [BUGS] character and text comparison - 09-15-2004 , 11:19 AM






Hello,

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?

regards,
Jacek Rembisz





---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Reply With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] character and text comparison - 09-15-2004 , 11:44 AM






Jacek Rembisz <jr178783 (AT) zodiac (DOT) mimuw.edu.pl> writes:
Quote:
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.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html


Reply With Quote
  #3  
Old   
Jacek Rembisz
 
Posts: n/a

Default Re: [BUGS] character and text comparison - 09-15-2004 , 12:51 PM



On Wed, Sep 15, 2004 at 12:43:11PM -0400, Tom Lane wrote:
Quote:
Jacek Rembisz <jr178783 (AT) zodiac (DOT) mimuw.edu.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

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo (AT) postgresql (DOT) org so that your
message can get through to the mailing list cleanly


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.