Domain bit cast - Mailing list pgsql-bugs

From Martin Sládek
Subject Domain bit cast
Date
Msg-id 418B4F25.3090502@msw.cz
Whole thread Raw
Responses Re: Domain bit cast
List pgsql-bugs
Cast int to domaim based on bit(n) works quite strange.

CREATE DOMAIN kat bit(40) NOT NULL;
SELECT 7::bit(40), 7::kat;


--on Win (7.5devel) and Linux (8.0.0b4)
bit | kat
0000000000000000000000000000000000000111 |
1000000000000000000000000000000000000000

--on Linux (7.4.6)
bit | kat
0000000000000000000000000000011100000000 |
0000000000000000000000000000011100000000

On 7.5 and 8.0 it seems that ::kat is ::bit::bit(40)



pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Possible bug: pg_hba.conf file
Next
From: Kris Jurka
Date:
Subject: Re: Domain bit cast