Subject | Re: [firebird-support] Storing a byte array in Firebird |
---|---|
Author | Mark Rotteveel |
Post date | 2019-10-27T07:02:05Z |
On 26-10-2019 22:46, blackfalconsoftware@... [firebird-support]
wrote:
(which will be padded with 0x00 up to the declared length) or
`VARCHAR(n) CHARACTER SET OCTETS`. For byte arrays this allows a maximum
length of 32767 bytes (32765 for `VARCHAR`). Firebird 4 introduces
aliases `BINARY(n)` and `VARBINARY(n)` for these types.
For longer values, use a `BLOB SUB_TYPE BINARY`.
Don't use an array type, they are badly supported in drivers and tools,
and even within Firebird support is minimal in DSQL/PSQL.
Mark
--
Mark Rotteveel
wrote:
> I need to store a byte array for the security aspect of the applicationIn Firebird 3 and earlier you can use `CHAR(n) CHARACTER SET OCTETS`
> I am developing.
>
>
> Would you simply store it in a field defined with the BLOB type or use
> the ARRAY type if one knew the length of the array?
(which will be padded with 0x00 up to the declared length) or
`VARCHAR(n) CHARACTER SET OCTETS`. For byte arrays this allows a maximum
length of 32767 bytes (32765 for `VARCHAR`). Firebird 4 introduces
aliases `BINARY(n)` and `VARBINARY(n)` for these types.
For longer values, use a `BLOB SUB_TYPE BINARY`.
Don't use an array type, they are badly supported in drivers and tools,
and even within Firebird support is minimal in DSQL/PSQL.
Mark
--
Mark Rotteveel