pgAdmin4 combines geometry SRID and type
In binary, 28356
is 0110 110 1100 0100
(hexadecimal 6E C4
)
In binary, 7259142
is 0110 110 1100 0100 0000 0110
(hexadecimal 6E C4 06
)
Therefore, it seems safe to assume that a bitwise right shift 8 will remove the SRID from the combined code, and a bitwise AND
mask with 0x00FF
will capture the geometry type (though casting to bit(8)
seems to be easier):
SELECT 7259142>>8 as srid, 7259142::bit(8) as type;
srid type
28356 00000110
If you generate a number of different tables with different geometry types, you should be able to discern a bit(8) -> varchar(20) mapping CASE
statement.