Why does the raster type not have send/receive defined?

Paul Ramsey pramsey at cleverelephant.ca
Tue Apr 8 08:18:03 PDT 2025


Yes this. The utility of the send/recv function are in supporting a client that is using a binary cursor. This doesn’t even happen much for vector data anymore (there was a brief period when we all felt it was de rigeur, and then it got benchmarked and it wasn’t that noticeable at all as a performance tweak, so everyone stopped, because it added complexity).

P

> On Apr 8, 2025, at 8:15 AM, <lr at pcorp.us> <lr at pcorp.us> wrote:
> 
> I think it’s because postgis raster is not an OGC standard or any kind of standard outside of PostGIS so there hasn’t been much need for it.
>  
> For example if you wanted to backup your postgis raster table, you’d just use standard pg_dump / pg_restore tools.
>  
> Most use cases beyond that are importing from a different raster format or exporting to a different raster format which functions 
>  
> https://postgis.net/docs/en/RT_ST_FromGDALRaster.html
>  
> and https://postgis.net/docs/en/RT_ST_AsGDALRaster.html
>  
> as well as the raster2pgsql commandline tool.
>  
>  
>  
>  
>  
> From: Lukas Panhirsch via postgis-users <postgis-users at lists.osgeo.org> 
> Sent: Tuesday, April 8, 2025 9:28 AM
> To: postgis-users at lists.osgeo.org
> Subject: Why does the raster type not have send/receive defined?
>  
> Hello, 
> 
> I haven't used this mailing list before and couldn't figure out how to search in the archives, so I apologize if this has been answered before. 
> 
> Is there any specific reason why the raster type does not have the send/receive functions in its SQL type definition? 
> The geometry type has these defined as conversions to/from EWKB, which are equivalent to ST_AsEWKB/ST_GeomFromEWKB if I understand correctly. 
> Equivalent (E?)WKB conversion functions exist for rasters in the form of (RT_)ST_AsBinary/ST_RastFromWKB, but have to be called explicitly. 
> I would like to use PostgreSQL features like COPY ... WITH BINARY with rasters, but it seems this is preventing me from doing so. 
> 
> Sincerely, 
> 
> Lukas 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20250408/f888a146/attachment.htm>


More information about the postgis-users mailing list