Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

RE: Re: Difficulty inserting a large object using DBD::Pg (kudra: int->OID possible, but doesn't fix )

by kudra (Vicar)
on Jun 29, 2000 at 19:22 UTC ( #20397=note: print w/ replies, xml ) Need Help??


in reply to Re: Difficulty inserting a large object using DBD::Pg
in thread Difficulty inserting a large object using DBD::Pg

I'm not sure what you're suggesting. Is it:

my $value = "111"; $dbh->do("insert into foo(id, test) values (8, ?)", undef, $value);
Certainly that will allow an insert, but then 111 becomes the value of the column, not an OID. Exporting it therefore doesn't work:
foobar=> select lo_export('test', '/tmp/x') from foo where id=8; ERROR: pg_atoi: error in "test": can't parse "test"
If the OID is a valid number, I imagine it will work, but then I still have to insert the data and get an OID, which puts me back to using lo_import. Or did I misunderstand your suggestion?


Comment on RE: Re: Difficulty inserting a large object using DBD::Pg (kudra: int->OID possible, but doesn't fix )
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://20397]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (14)
As of 2015-07-01 16:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (9 votes), past polls