Support for binary input/output for raster
|Reported by:||cyrilleberger||Owned by:||dustymugs|
The raster type does not support binary input/output (it only has raster_in and raster_out, and no raster_recv and raster_send). Since sending data to the server is more efficient using the binary protocol, it would be convenient to add support for binary mode when doing SQL queries.
I managed to work around for sending raster data from the server to the client with the following SQL:
CREATE OR REPLACE FUNCTION raster_send(raster) RETURNS bytea AS 'SELECT bytea($1)' LANGUAGE SQL;
UPDATE pg_type SET typsend = 'raster_send' WHERE typname='raster'
Unfortunately, there is no way to create a similar function for raster_recv.