Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
Think about Loose Coupling
 
PerlMonks  

Re: Difficulty inserting a large object using DBD::Pg

by httptech (Chaplain)
on Jun 29, 2000 at 15:11 UTC ( [id://20389]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


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

I found this when reading the documentation on the PostgreSQL site:
A column of type OID is similar to an INTEGER column, but defining it as type OID documents that the column holds OID values.

The second snippet you showed using "do" works when $value is an integer. Also since, "atoi error" points to a problem while converting ASCII to integer, I think the evidence points to OIDs being integer-only.

  • Comment on Re: Difficulty inserting a large object using DBD::Pg

Replies are listed 'Best First'.
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 15:22 UTC
    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?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://20389]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.