开发者

how to get binary data from sql query?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜