By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,745 Members | 1,957 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,745 IT Pros & Developers. It's quick & easy.

use of client-side \lo_import and \lo_export commands

nehashri
P: 49
I am trying to insert a large object into my dbs
using: INSERT INTO table VALUES (lo_import ( ' z/image/image.jpg ' ));


but i get the message saying that I need superuser privilidges to do it and that I should use client-side

\lo_import command.

Does anyone know how to use that command? And what is the syntax for \lo_import and export commands?

der is also an HINT:- Anyone can use the client-side lo_import() provided by libpq.
hw do i use client-side lo_import() provided by libpq or 4 that matter hw 2 use libpq.

Many thanks in advance.
Feb 28 '07 #1
Share this Question
Share on Google+
3 Replies


Expert 100+
P: 534
You may find these links helpful:
Server Side lo-funcs

lo-interfaces

By the way, couple things don't look right in the code you quoted:

lo_import ( ' z/image/image.jpg ' );

Looks like you have spaces around the pathname, and pathname itself is relative - meaning Postgres will look for it in the current directory.
I would try to give it an absolute name, something like
lo_import ( '/home/z/image/image.jpg' );
Mar 1 '07 #2

nehashri
P: 49
thank you ill look for it
thnx 1ce again
tc
neha
Mar 2 '07 #3

Expert 100+
P: 534
You're welcome, hope it'll help.
Mar 2 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.