How do I stream large objects from PostgreSQL in JRuby?
In JRuby you can't use the pg
gem as you would in regular Ruby, so you can't use it's large object support.
However you do have access to PgJDBC
, so you can use the large object features offered by PgJDBC, same as you would from Java directly. See:
- http://jdbc.postgresql.org/documentation/91/largeobjects.html
- http://jdbc.postgresql.org/documentation/91/binary-data.html#binary-data-example
This should work much the same in JRuby as in regular Java.