in reply to Re: postgresql: store binary data?
in thread postgresql: store binary data?

Now I'm found following note in the DBD::Pg module documentation.

NOTE: The undocumented (and invalid) support for the "SQL_BINARY" data type is officially deprecated. Use "PG_BYTEA" with "bind_param()" instead: $rv = $sth->bind_param($param_num, $bind_value, { pg_type => DBD::Pg::PG_BYTEA });

Code seems to work OK after modification

$sth->bind_param(2, nfreeze($test), { pg_type => DBD::Pg::PG_BYTEA });

Thanks