dbTalk Databases Forums  

[BUGS] BUG #1578: ::bit(n) behaves "differently" if applied to bit strings than integers.

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


Discuss [BUGS] BUG #1578: ::bit(n) behaves "differently" if applied to bit strings than integers. in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Celia McInnis
 
Posts: n/a

Default [BUGS] BUG #1578: ::bit(n) behaves "differently" if applied to bit strings than integers. - 04-10-2005 , 02:23 PM







The following bug has been logged online:

Bug reference: 1578
Logged by: Celia McInnis
Email address: celia (AT) drmath (DOT) ca
PostgreSQL version: 8.0.1
Operating system: Linux
Description: ::bit(n) behaves "differently" if applied to bit strings
than integers.
Details:

It's probably not good (at least for mathematicians!) to have the following
give different results:

select B'1110110101'::bit(6);
select B'1110110101'::integer::bit(6);

The first gives 110101 (the 6 least significant bits).
The second gives 111011 (the 6 most significant bis).

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo (AT) postgresql (DOT) org)

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.