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
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
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||