443e6135创建于 2022年12月23日历史提交
create schema uint_or;
set current_schema to 'uint_or';
--uint8
select 18446744073709551615::uint8 | 0::int1;
       ?column?       
----------------------
 18446744073709551615
(1 row)

select 18446744073709551615::uint8 | 0::int2;
       ?column?       
----------------------
 18446744073709551615
(1 row)

select 18446744073709551615::uint8 | 0::int4;
       ?column?       
----------------------
 18446744073709551615
(1 row)

select 18446744073709551615::uint8 | 0::int8;
       ?column?       
----------------------
 18446744073709551615
(1 row)

select 18446744073709551615::uint8 | 0::uint1;
       ?column?       
----------------------
 18446744073709551615
(1 row)

select 18446744073709551615::uint8 | 0::uint2;
       ?column?       
----------------------
 18446744073709551615
(1 row)

select 18446744073709551615::uint8 | 0::uint4;
       ?column?       
----------------------
 18446744073709551615
(1 row)

select 18446744073709551615::uint8 | 0::uint8;
       ?column?       
----------------------
 18446744073709551615
(1 row)

select 18446744073709551615::uint8 | 127::int1;
       ?column?       
----------------------
 18446744073709551615
(1 row)

select 18446744073709551615::uint8 | 32767::int2;
       ?column?       
----------------------
 18446744073709551615
(1 row)

select 18446744073709551615::uint8 | 2147483647::int4;
       ?column?       
----------------------
 18446744073709551615
(1 row)

select 18446744073709551615::uint8 | 9223372036854775807::int8;
       ?column?       
----------------------
 18446744073709551615
(1 row)

select 18446744073709551615::uint8 | 255::uint1;
       ?column?       
----------------------
 18446744073709551615
(1 row)

select 18446744073709551615::uint8 | 65535::uint2;
       ?column?       
----------------------
 18446744073709551615
(1 row)

select 18446744073709551615::uint8 | 4294967295::uint4;
       ?column?       
----------------------
 18446744073709551615
(1 row)

select 18446744073709551615::uint8 | 18446744073709551615::uint8;
       ?column?       
----------------------
 18446744073709551615
(1 row)

select 18446744073709551615::uint8 | (-32768)::int2;
       ?column?       
----------------------
 18446744073709551615
(1 row)

select 18446744073709551615::uint8 | (-2147483648)::int4;
       ?column?       
----------------------
 18446744073709551615
(1 row)

select 18446744073709551615::uint8 | (-9223372036854775808)::int8;
       ?column?       
----------------------
 18446744073709551615
(1 row)

--uint4
select 4294967295::uint4 | 0::int1;
  ?column?  
------------
 4294967295
(1 row)

select 4294967295::uint4 | 0::int2;
  ?column?  
------------
 4294967295
(1 row)

select 4294967295::uint4 | 0::int4;
  ?column?  
------------
 4294967295
(1 row)

select 4294967295::uint4 | 0::int8;
  ?column?  
------------
 4294967295
(1 row)

select 4294967295::uint4 | 0::uint1;
  ?column?  
------------
 4294967295
(1 row)

select 4294967295::uint4 | 0::uint2;
  ?column?  
------------
 4294967295
(1 row)

select 4294967295::uint4 | 0::uint4;
  ?column?  
------------
 4294967295
(1 row)

select 4294967295::uint4 | 0::uint8;
  ?column?  
------------
 4294967295
(1 row)

select 4294967295::uint4 | 127::int1;
  ?column?  
------------
 4294967295
(1 row)

select 4294967295::uint4 | 32767::int2;
  ?column?  
------------
 4294967295
(1 row)

select 4294967295::uint4 | 2147483647::int4;
  ?column?  
------------
 4294967295
(1 row)

select 4294967295::uint4 | 9223372036854775807::int8;
      ?column?       
---------------------
 9223372036854775807
(1 row)

select 4294967295::uint4 | 255::uint1;
  ?column?  
------------
 4294967295
(1 row)

select 4294967295::uint4 | 65535::uint2;
  ?column?  
------------
 4294967295
(1 row)

select 4294967295::uint4 | 4294967295::uint4;
  ?column?  
------------
 4294967295
(1 row)

select 4294967295::uint4 | 18446744073709551615::uint8;
       ?column?       
----------------------
 18446744073709551615
(1 row)

select 4294967295::uint4 | (-32768)::int2;
  ?column?  
------------
 4294967295
(1 row)

select 4294967295::uint4 | (-2147483648)::int4;
  ?column?  
------------
 4294967295
(1 row)

select 4294967295::uint4 | (-9223372036854775808)::int8;
      ?column?       
---------------------
 9223372041149743103
(1 row)

--uint2
select 65535::uint2 | 0::int1;
 ?column? 
----------
 65535
(1 row)

select 65535::uint2 | 0::int2;
 ?column? 
----------
 65535
(1 row)

select 65535::uint2 | 0::int4;
 ?column? 
----------
 65535
(1 row)

select 65535::uint2 | 0::int8;
 ?column? 
----------
 65535
(1 row)

select 65535::uint2 | 0::uint1;
 ?column? 
----------
 65535
(1 row)

select 65535::uint2 | 0::uint2;
 ?column? 
----------
 65535
(1 row)

select 65535::uint2 | 0::uint4;
 ?column? 
----------
 65535
(1 row)

select 65535::uint2 | 0::uint8;
 ?column? 
----------
 65535
(1 row)

select 65535::uint2 | 127::int1;
 ?column? 
----------
 65535
(1 row)

select 65535::uint2 | 32767::int2;
 ?column? 
----------
 65535
(1 row)

select 65535::uint2 | 2147483647::int4;
  ?column?  
------------
 2147483647
(1 row)

select 65535::uint2 | 9223372036854775807::int8;
      ?column?       
---------------------
 9223372036854775807
(1 row)

select 65535::uint2 | 255::uint1;
 ?column? 
----------
 65535
(1 row)

select 65535::uint2 | 65535::uint2;
 ?column? 
----------
 65535
(1 row)

select 65535::uint2 | 4294967295::uint4;
  ?column?  
------------
 4294967295
(1 row)

select 65535::uint2 | 18446744073709551615::uint8;
       ?column?       
----------------------
 18446744073709551615
(1 row)

select 65535::uint2 | (-32768)::int2;
 ?column? 
----------
 65535
(1 row)

select 65535::uint2 | (-2147483648)::int4;
  ?column?  
------------
 2147549183
(1 row)

select 65535::uint2 | (-9223372036854775808)::int8;
      ?column?       
---------------------
 9223372036854841343
(1 row)

--uint1
select 255::uint1 | 0::int1;
 ?column? 
----------
 255
(1 row)

select 255::uint1 | 0::int2;
 ?column? 
----------
 255
(1 row)

select 255::uint1 | 0::int4;
 ?column? 
----------
 255
(1 row)

select 255::uint1 | 0::int8;
 ?column? 
----------
 255
(1 row)

select 255::uint1 | 0::uint1;
 ?column? 
----------
 255
(1 row)

select 255::uint1 | 0::uint2;
 ?column? 
----------
 255
(1 row)

select 255::uint1 | 0::uint4;
 ?column? 
----------
 255
(1 row)

select 255::uint1 | 0::uint8;
 ?column? 
----------
 255
(1 row)

select 255::uint1 | 127::int1;
 ?column? 
----------
 255
(1 row)

select 255::uint1 | 32767::int2;
 ?column? 
----------
 32767
(1 row)

select 255::uint1 | 2147483647::int4;
  ?column?  
------------
 2147483647
(1 row)

select 255::uint1 | 9223372036854775807::int8;
      ?column?       
---------------------
 9223372036854775807
(1 row)

select 255::uint1 | 255::uint1;
 ?column? 
----------
 255
(1 row)

select 255::uint1 | 65535::uint2;
 ?column? 
----------
 65535
(1 row)

select 255::uint1 | 4294967295::uint4;
  ?column?  
------------
 4294967295
(1 row)

select 255::uint1 | 18446744073709551615::uint8;
       ?column?       
----------------------
 18446744073709551615
(1 row)

select 255::uint1 | (-32768)::int2;
 ?column? 
----------
 33023
(1 row)

select 255::uint1 | (-2147483648)::int4;
  ?column?  
------------
 2147483903
(1 row)

select 255::uint1 | (-9223372036854775808)::int8;
      ?column?       
---------------------
 9223372036854776063
(1 row)

--int8
select 9223372036854775807::int8 | 0::uint1;
      ?column?       
---------------------
 9223372036854775807
(1 row)

select 9223372036854775807::int8 | 0::uint2;
      ?column?       
---------------------
 9223372036854775807
(1 row)

select 9223372036854775807::int8 | 0::uint4;
      ?column?       
---------------------
 9223372036854775807
(1 row)

select 9223372036854775807::int8 | 0::uint8;
      ?column?       
---------------------
 9223372036854775807
(1 row)

select 9223372036854775807::int8 | 255::uint1;
      ?column?       
---------------------
 9223372036854775807
(1 row)

select 9223372036854775807::int8 | 65535::uint2;
      ?column?       
---------------------
 9223372036854775807
(1 row)

select 9223372036854775807::int8 | 4294967295::uint4;
      ?column?       
---------------------
 9223372036854775807
(1 row)

select 9223372036854775807::int8 | 18446744073709551615::uint8;
       ?column?       
----------------------
 18446744073709551615
(1 row)

select 9223372036854775807::int8 | 1::uint1;
      ?column?       
---------------------
 9223372036854775807
(1 row)

select 9223372036854775807::int8 | 1::uint2;
      ?column?       
---------------------
 9223372036854775807
(1 row)

select 9223372036854775807::int8 | 1::uint4;
      ?column?       
---------------------
 9223372036854775807
(1 row)

select 9223372036854775807::int8 | 1::uint8;
      ?column?       
---------------------
 9223372036854775807
(1 row)

select (-9223372036854775808)::int8 | 255::uint1;
      ?column?       
---------------------
 9223372036854776063
(1 row)

select (-9223372036854775808)::int8 | 65535::uint2;
      ?column?       
---------------------
 9223372036854841343
(1 row)

select (-9223372036854775808)::int8 | 4294967295::uint4;
      ?column?       
---------------------
 9223372041149743103
(1 row)

select (-9223372036854775808)::int8 | 18446744073709551615::uint8;
       ?column?       
----------------------
 18446744073709551615
(1 row)

--int4
select 2147483647::int4 | 0::uint1;
  ?column?  
------------
 2147483647
(1 row)

select 2147483647::int4 | 0::uint2;
  ?column?  
------------
 2147483647
(1 row)

select 2147483647::int4 | 0::uint4;
  ?column?  
------------
 2147483647
(1 row)

select 2147483647::int4 | 0::uint8;
  ?column?  
------------
 2147483647
(1 row)

select 2147483647::int4 | 255::uint1;
  ?column?  
------------
 2147483647
(1 row)

select 2147483647::int4 | 65535::uint2;
  ?column?  
------------
 2147483647
(1 row)

select 2147483647::int4 | 4294967295::uint4;
  ?column?  
------------
 4294967295
(1 row)

select 2147483647::int4 | 18446744073709551615::uint8;
       ?column?       
----------------------
 18446744073709551615
(1 row)

select 2147483647::int4 | 1::uint1;
  ?column?  
------------
 2147483647
(1 row)

select 2147483647::int4 | 1::uint2;
  ?column?  
------------
 2147483647
(1 row)

select 2147483647::int4 | 1::uint4;
  ?column?  
------------
 2147483647
(1 row)

select 2147483647::int4 | 1::uint8;
  ?column?  
------------
 2147483647
(1 row)

select (-2147483648)::int4 | 255::uint1;
  ?column?  
------------
 2147483903
(1 row)

select (-2147483648)::int4 | 65535::uint2;
  ?column?  
------------
 2147549183
(1 row)

select (-2147483648)::int4 | 4294967295::uint4;
  ?column?  
------------
 4294967295
(1 row)

select (-2147483648)::int4 | 18446744073709551615::uint8;
       ?column?       
----------------------
 18446744073709551615
(1 row)

--int2
select 32767::int2 | 0::uint1;
 ?column? 
----------
 32767
(1 row)

select 32767::int2 | 0::uint2;
 ?column? 
----------
 32767
(1 row)

select 32767::int2 | 0::uint4;
 ?column? 
----------
 32767
(1 row)

select 32767::int2 | 0::uint8;
 ?column? 
----------
 32767
(1 row)

select 32767::int2 | 255::uint1;
 ?column? 
----------
 32767
(1 row)

select 32767::int2 | 65535::uint2;
 ?column? 
----------
 65535
(1 row)

select 32767::int2 | 4294967295::uint4;
  ?column?  
------------
 4294967295
(1 row)

select 32767::int2 | 18446744073709551615::uint8;
       ?column?       
----------------------
 18446744073709551615
(1 row)

select 32767::int2 | 1::uint1;
 ?column? 
----------
 32767
(1 row)

select 32767::int2 | 1::uint2;
 ?column? 
----------
 32767
(1 row)

select 32767::int2 | 1::uint4;
 ?column? 
----------
 32767
(1 row)

select 32767::int2 | 1::uint8;
 ?column? 
----------
 32767
(1 row)

select (-32768)::int2 | 255::uint1;
 ?column? 
----------
 33023
(1 row)

select (-32768)::int2 | 65535::uint2;
 ?column? 
----------
 65535
(1 row)

select (-32768)::int2 | 4294967295::uint4;
  ?column?  
------------
 4294967295
(1 row)

select (-32768)::int2 | 18446744073709551615::uint8;
       ?column?       
----------------------
 18446744073709551615
(1 row)

--int1
select 127::int1 | 0::uint1;
 ?column? 
----------
 127
(1 row)

select 127::int1 | 0::uint2;
 ?column? 
----------
 127
(1 row)

select 127::int1 | 0::uint4;
 ?column? 
----------
 127
(1 row)

select 127::int1 | 0::uint8;
 ?column? 
----------
 127
(1 row)

select 127::int1 | 255::uint1;
 ?column? 
----------
 255
(1 row)

select 127::int1 | 65535::uint2;
 ?column? 
----------
 65535
(1 row)

select 127::int1 | 4294967295::uint4;
  ?column?  
------------
 4294967295
(1 row)

select 127::int1 | 18446744073709551615::uint8;
       ?column?       
----------------------
 18446744073709551615
(1 row)

select 127::int1 | 1::uint1;
 ?column? 
----------
 127
(1 row)

select 127::int1 | 1::uint2;
 ?column? 
----------
 127
(1 row)

select 127::int1 | 1::uint4;
 ?column? 
----------
 127
(1 row)

select 127::int1 | 1::uint8;
 ?column? 
----------
 127
(1 row)

drop schema uint_or cascade;
reset current_schema;