Using OTB for PostGIS data

Is there any chance of using OTB algorithms with input and output data from PostgreSQL/PostGIS databases?
I would like to use ObjectRadiometricStatistics to extract the feature statistics from a virtual raster and store them in a huge polygon table in PostgreSQL.



Since GDAL/OGR is reading this data for OTB, it should be possible. However this test case is not heavily tested in OTB. You should start with this documentation:

Passing the string “PG:dbname…” instead of a regular file path should be the way.


I tried it and it states an error BUT it says that it cannot be done in PostGIS.
This is a good feedback, as it recognizes it. As I was thinking, if the main drivers are GDAL/OGR, it can be possible. I think that I should compile GDAL from scratch here.
I think that an option to extend the writing/reading to PostGIS would make OTB so much powerful. I am using it for segments and this combination is a killer one.