The following table lists the sizes of variable-length data types.
Data type | Size (bytes) | Remarks |
---|---|---|
path | Length of size portion + 12 + 16 x number of vertices | 1) When carrying out division, round to the next integer. 2) If the real data length is less than 127, then the length of the size portion is 1 byte, otherwise it is 4 bytes. 3) The number of bytes per character depends on the character set (refer to "E.3.4 Number of Bytes per Character" for details). |
polygon | Length of size portion + 36 + 16 x number of vertices | |
decimal | Length of size portion + 2 + (integer precision / 4 + decimal precision / 4) x 2 | |
numeric | ||
bytea | Length of size portion + real data length | |
character varying(n), varchar(n) | Length of size portion + number of characters x number of bytes per character | |
character(n), char(n) | Length of size portion + n x number of bytes per character | |
text | Length of size portion + number of characters x number of bytes per character |