Slashdot Mirror


Dealing with BLOBs in Postgres?

Greyfox asks: "I've got a question and it's been bugging me for a while. I'm trying to do some database programming with Java and PostgresSQL. I've got an array of bytes I'd like to store in the database and I can't quite figure out how to do it. I've tried the method suggested in their old documentation (Which involves doing some JDBC thing with a FileInputStream) and some esoteric BLOB thing involving ResultSet.setBytes() and a more esoteric BLOB thing involving their LargeObjectManager and when I'm at my most successful I get error messages back griping about unexpected EOFs from the connection manager or somesuch. The documentation, example code and web searches have all been profoundly unhelpful. Am I going about this the right way and if I am, what am I missing?"

4 of 16 comments (clear)

  1. K-Plan by Anonymous Coward · · Score: -1, Offtopic

    The K-Plan diet deals with blobs.

  2. Land Of The Morning Calm by The+Lyrics+Guy · · Score: -1, Offtopic

    The Templars - Land Of The Morning Calm

    On a world flight late one night
    He left his friends, he left his wife
    Far to the east, destination unknown
    Doesn't even know where to call his home

    Thought he had it bad back on the block
    Knocking down pints with no afterthought
    Now he's far away in some foreign land
    He took for granted all he had

    CHORUS
    Over the Sea of Japan (x2)
    He left his freedom, he left his land
    Over the Sea of Japan

    12 beers later and the sun in his face
    It's not a bad dream, he's really in this place
    360 days to some, but they're not in the land of the morning calm.

    CHORUS

    Repeat first & second verse

    CHORUS

    1. Re:Land Of The Morning Calm by Shabazz+Rabbinowitz · · Score: -1, Offtopic

      fuckin aye

  3. Shameless plug by fm6 · · Score: 1, Offtopic

    Interbase has excellent blob support. Borland markets it as an "embedded" database, but in the real world it's used at all scales, including servers that do stock market transactions. The open source version has an active community, including a lot of people who helped create the original closed-source product.