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?"
The K-Plan diet deals with blobs.
I am not an expert by any means. I am just poking a question and trying to get you to think about it.
One question:
How sure are you that your database tables are configured to be able to store BLOB data? Don't you need to specify some sort of separate tablespace to store the blob data and then assign a table column to use that space?
-- Betting on the survival of the media industry is a serious risk. I advise investing elsewhere.
Large object documentation
Or you can use bytea or TEXT like I do.
-Dave
Let's not stir that bag of worms...
When I have a problem of such type and I cannot solve it myself I usually find relevant maillist and ask where. If problem is not very hard chances are that it will be answered in minutes.
I just don't get why editors pass such submissions and people submit them. It just doesn't make any sense. If you post in PostgreSQL maillist chances that in the future another person with same problem will find solution in its archives. But who in good state of mind will search for solution of PostgreSQL very specific problem on Slashdot? On the other side I'm sure that submitter of this query will have to wait longer for reply which could solve his problems (probably forever).
--
Ilya Martynov (http://martynov.org/)
One possible solution I came up with was to UUEncode the data, then store it in a text field.
I never actually implemented this, but it should be fairly easy to do (either outside the DB or using a Postgres user-defined function.
The existing BLOB support is documented briefly Here, but quite honestly it... well sucks.
/~mikeg
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
THE OFFICIAL TACO-SNOTTING FAQ
By The WIPO Troll, $Revision: 1.11 $
Why have I been receiving emails from CmdrTaco, in which he seems to be speaking in some kind of code language?
Good Lord. What is "Taco-snotting?"
Ewwwwww. So, can I stop receiving these emails?
I can't stop receiving these emails from CmdrTaco!?
Have you ever been Taco-Snotted?
That's horrible. Does "Taco-snotting" have anything to do with CmdrTaco's "special taco"?
Does Jon Katz get involved in any of this? I thought he was a paedophile, not a homosexual.
No, thanks. I'm already CmdrTaco's boi toi.
________________________________________
READER COMMENTS
by Anonymous Coward on 2001.11.25 9:14 (#2609574)
try to find a pic of actual "taco-snotting"! fucking funny it would be! so go to gay porn sites day in and day out until you find a man giving another man a blowjob that has jizz coming out of his nose and mouth. by the way, keep up the good work
by Anonymous Coward on 2001.11.23 12:18 (#2603370)
WIPO, this is getting waaaay old, either drop it or revise it.... there've been no updates for days now...
CmdrTaco
by Anonymous Coward on 2001.11.22 17:28 (#2600815)
A truly excellent and very humourous troll indeed!
However...
To complete this perverted orgy, fellow geeks Michael, Timothy, and Jamie often join in, dressed in black Gestapo uniforms, jack boots, and leather gloves.
Black GeStaPo uniforms? The GeStaPo (Geheime Staatspolizei - Secret State Police) wore civilian clothes (although there are reports on them occasionally using Allgemeine SS uniforms in occupied territories).
I seriously doubt that perverted individuals like CmdrTaco et al would have the good taste to ever wear the outstandingly beautiful black Waffen SS uniforms! Please update the FAQ accordingly.
by Anonymous Coward on 2001.11.23 4:06 (#2602610)
Actually, it appears you are both wrong!! Ah ha!! I think our boy WIPO was thinking of the Allgemeine SS uniforms. Waffen SS were grey.
by Anonymous Coward on 2001.11.21 4:49 (#2594325)
oh yeah, you say you have masturbated only 2 times to this post. well, by the time it takes for me to get through reading it, i usually end up masturbated 5 to 6 times, 10 to 12 if i have the goatse.cx homepage loaded up and am looking at it side by side with the slashdot page. my keyboard, hands, mouse, monitor, the underside of my desk and around the floor under my desk are cum soaked and sticky with the man smell i know and love.
by Anonymous Coward on 2001.11.21 4:41 (#2594311)
for version 2 you should make a total re-write of the cod...errr...text and add some details about cmdrtaco and the homo-gang's happenings with their coworkers (osdn?) and all of the gay revelry they enjoy and promote. by the way, did i just see cmdrtaco on television promoting the nax hair removal system? i guess after using vaseline in and around his ass he grew quite a ponytail and it had to be removed somehow...ouch!
by TRoLLaXoR on 2001.11.21 3:59 (#2594191)
WIPO, do you notice how few comments you get for anything you write/post/spam nowadays?
-Trollaxor
by sales_worldwide on 2001.11.20 11:53 (#2588488)
You forgot to mention Jon Katz's "docking" games, where he places his chopper head to head with another chap, and rolls the other guys foreskin over his own circumcised end ("docking"), providing him with fantasies of actually having his own forskin
"Making linux GPL was the best thing I ever did" - Torvalds. I'd hate to see the worst thing...
by Fucky the troll on 2001.11.20 11:28 (#2588446)
Woah! When did the WIPO troll get freed? And how the fuck did I miss it?
Excellent FP, sir.
This is a sig virus. Please put me in your sig
by Anonymous Coward on 2001.11.20 11:04 (#2588407)
omg that is crapflooding material if i ever saw it!!!!!! and u got a first post!!!! whoot to the wipo troll!!!
by Anonymous Coward on 2001.11.19 9:03 (#2583756)
GW...you know we love every hair on your 27 acre ass... and I, for one, would never do anything untowards your graceful demeanor. And you probably have several friends that would love to help you do the bear dance all over my face if I so much as spelled your name wrong. And you know I'd defend your Constitutional right to defame God in heaven. I'd even help fund your education, should you ever decide to take that route. Hell, I'd buy you a tall tepid bear-whiz beer if you were here with me, right now!
But.
Now go stick your shaved head back down inside the woman's toilet, and just to show there's no hard feelings, I'll jump in the tow-truck and drive right over to help you pull it right out...ok?
thanks
by mark knopfler 69 on 2001.11.19 8:25 (#2583695)
I DO NOT BELIEVE YOU SIR. FOR ONE THING, THE E-MAIL FROM CMDRTACO DOES NOT HAVE ENOUGH GRAMMATICAL AND SPELLING MISTAKES. Let's be realistic here, CmdrTaco usually types with one hand, and since he is shaking from jacking off his aim on the keyboard isn't too good. Those e-mails were a little too well written. Sorry boy, you'll have to do better.
by WeatherTroll on 2001.11.19 8:14 (#2583667)
You should update this to say VA Software instead of VA Linux.
by smackmonkey on 2001.11.19 7:06 (#2583510)
Crackhead moderators: this is +5, Hilarious material.
--
CNN declares War on Islam!
Left-wing America declares War on its Civil Liberties!
by Anonymous Coward on 2001.11.19 5:40 (#2583336)
This was funny the first 100 times. Now it is getting boring!
by egg troll on 2001.11.18 22:27 (#2582054)
Having masturbated *twice* to this post, I'm still incredibly aroused! Come over for a Taco Snot. I'll be wearing my crotchless Clifford the Big Red Dog outfit!!
For more info check out this
by Anonymous Coward on 2001.11.18 12:03 (#2580822)
add more links to goatse and to cowboineal's site to make it better. a link to rotten.com would be nice too
by Anonymous Coward on 2001.11.18 12:18 (#2580832)
and a link to michael's site and to jon katz's site if he has one and homo's site. i dont know what else to say. maybe a few links to phallic.org they have nice penis pictures! a link to the planet quake site or whatever. really make the reader feel this faq really answers their questions. oh yeah, and when you talk about cmdrtaco snotting you, say he brought you to "orgasm after sweaty orgasm". describe it more is all i'm saying. and use more italics and bolding! and when you talk about jon katz shitting or whatever have a link to fecal japan on rotten.com
other wise a great job wipo troll! keep up the good work!
by Wil Wheaton on 2001.11.18 6:41 (#2580438)
Hi. Let's be buddies.. butt buddies.
--
WIL WHEATON DOT NET
by dead_puppy on 2001.11.18 5:33 (#2580342)
Here is an e-mail I received a week ago:
From: malda@slashdot.org
To: puppy_dead@hotmail.com
Subject: were where you last friday?
I thought we where supposed to meet at Backdoor's at 8-ish, sugar-lips? You could've at least told me that you could'nt make it! I was even in my favorite pink skirt for you, honey-cup... next time, you could be more considarite and tell me you cant come... bastard.
--
CmdrTaco (malda@slashdot.org)
You finding Ling-Ling's head?
by Big_Ass_Spork on 2001.11.18 4:53 (#2580300)
I do it wrong
Laying here in the shadows of my room, I squint up at my love. My Ms. Portman. I am sore and tired after fucking her for eight solid hours. My chapped and aching dick is soaking in grits to relieve the pain. She gets on her knees and starts lapping the grits up out of the bowl. She places her beautiful hands on my penis and starts to lick the grits off my achy piece.
Massaging my nutsack she....
WAIT, I DO IT WRONG!!!!
Yanking my dick out of her mouth I throw her to the ground and shove it in to her gaping freshly fisted ass. [goatse.cx]
"OH BIG ASS SPORK!! Fuck my ass, fuck my ass good. DEEPER, my stallion, deeper!! Make a Beowulf cluster of sperm on my back!!"
"Imagine a Beowulf cluster of this baby!"
I DO IT WRONG!!!!
---
All your Sporks are belong to Big_Ass_Spork! What you say?! All your Sporks are belo... forget it...
by j0nkatz on 2001.11.17 22:54 (#2579596)
I just heard some sad news on the radio -- famous queerbait Rob Malda was found dead in his Holland home this morning. The details were a bit hazy, but it seems that he drowned in jizz while Taco Snotting his friend Hemos. I'm sure everyone in the
I wanna Open Source sex so it won't be worth a shit either.
by Anonymous Coward on 2001.11.15 6:38 (#2567601)
No no no, the correct term for that is "donkey-punch". I have eye-witnessed this amazing eye-popping event demonstrated on unsuspecting hose-monsters by my frat brothers in the past.. .
by AbsoluteRelativity on 2001.11.15 5:31 (#2567457)
The WIPO Troll
Slashdot and the Karma Lottery - News for uber monkeys, by uber monkeys.
by Anonymous Coward on 2001.11.13 9:27 (#2557632)
Oh, man that's just sick !
by Anonymous Coward on 2001.11.13 9:03 (#2557604)
TELL ME WHERE I CAN GET AN ANONYMOUS proxy please WIPO Troll. Maybe later i will join you in a snotting at my place.
by vikool on 2001.11.13 7:43 (#2557495)
what is this bull shit,i feel offened that some people feel so so senseless to post stuff like these esp when such a tragic incident has occured
by I.T.R.A.R.K. on 2001.11.11 22:38 (#2551890)
Where the fuck do I sign up?!
- I throw rocks at retarded kids
"Adequacy.org: Where congenital stupidity is not an option, but a requirement."
by Anonymous Coward on 2001.11.11 21:53 (#2551753)
this shit is hilarious..keep up the good work.
by rockwood on 2001.11.11 21:49 (#2551746)
OMG! That is the most disgusting thing I have ever heard! WHo in their right mind would sit down and waste the time to construct such a replusive story. I guess I'll be skipping lunch and dinner today.. and possibly tomorrow also. The game doesn't affect reality. Reality affects the game.
by Anonymous Coward on 2001.11.11 14:43 (#2550701)
dude, this is crap-flood material if i ever saw it.
duuuuuuuuudddddddddddddeeeeeeeee.
by Anonymous Coward on 2001.11.11 8:16 (#2550266)
horny_rob_6969@hotmail.com
Ah, so that's what the alt.binaries.pictures.erotica.horny-rob newsgroup is about!
by egg troll on 2001.11.11 5:34 (#2550024)
+5, Arousing
For more info check out this
by Anonymous Coward on 2001.11.11 4:39 (#2549891)
WINNER>
by Anonymous Coward on 2001.11.11 4:37 (#2549887)
I love you. Why do you use your bitchslapped account, rather than signing up for a new account to post at +1 before getting bitchslapped by the censors here? I guess I should speak for myself, but I don't want to log out and lose all my slashdot customization properties, nor do I want to lose my 50 karma yet.
by Anonymous Coward on 2001.11.09 9:19 (#2542412)
you fucking rock! right down to the expanded cvs id!
WIPO trolls > linux
________________________________________
J. Wipo Troll, Esq.
Crapflooder Associates
Slashdot.org
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.
You should have a look at the PostgreSQL JDBC documentation, which can be found at http://jdbc.postgresql.org. While you're at it, also search for BYTEA in the PGSQL JDBC mailingslist.
This is one of the reasons I decided not to switch from MySQL to PostgreSQL : the BLOB support in PostgreSQL is very crappy (and the "large object interface" is a horrible hack and pain in the ass to use). (yes I know the latest version doesn't have any limit on row size anymore and could store BLOB without going thru the large object interface).