开发者

how to get binary data from sql query?

开发者 https://www.devze.com 2023-03-14 17:00 出处:网络
I have a PostgreSQL table containing some binary data. 开发者_JS百科 I need to get the content of \"select content from repository where documentuniqueid=\'1.3.6.1.4.1.21367.2010.1.2.166.1550151160132

I have a PostgreSQL table containing some binary data.

开发者_JS百科

I need to get the content of "select content from repository where documentuniqueid='1.3.6.1.4.1.21367.2010.1.2.166.155015116013230039.13086'" as a binary feed.

Is there a way to do this?

Thank you.


If you're using Java, you'll find some documentation about handling BLOBs via JDBC in the PostgreSQL JDBC driver documentation (e.g. via an InputStream).

You may also be interested in this question: Postgresql, JDBC, and streaming BLOBs

If you're not necessarily using Java, you may be interested in lo_export(), as @marto said.


Stored in a Blob I assume?

lo_export()

0

精彩评论

暂无评论...
验证码 换一张
取 消