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

psql and \lo_import

P: n/a
I'm working psql v7.2.2 to postmaster v7.2.2 and want to use the
\lo_import function.

The psql manual says that the syntax is \lo_import '<filename>' 'comment'

This loads the blob OK and returns the loid but the comment gets lost and
doesn't appear when I run \lo_list

Any ideas?

--
Howard.
LANNet Computing Associates - Your Linux people <http://www.lannetlinux.com>
------------------------------------------
Flatter government, not fatter government - Get rid of the Australian states.
------------------------------------------
If all economists were laid end to end, they would not reach a conclusion
- George Bernard Shaw
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Nov 11 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Howard Lowndes <la****@lannet.com.au> writes:
I'm working psql v7.2.2 to postmaster v7.2.2 and want to use the
\lo_import function.
The psql manual says that the syntax is \lo_import '<filename>' 'comment'
This loads the blob OK and returns the loid but the comment gets lost and
doesn't appear when I run \lo_list


I think the comment-on-LO facility only works if you are superuser
(because it's hacking a system table, there not being any actual
COMMENT ON LARGE OBJECT command).

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Nov 11 '05 #2

P: n/a
On Mon, 22 Sep 2003, Tom Lane wrote:
Howard Lowndes <la****@lannet.com.au> writes:
I'm working psql v7.2.2 to postmaster v7.2.2 and want to use the
\lo_import function.
The psql manual says that the syntax is \lo_import '<filename>' 'comment'
This loads the blob OK and returns the loid but the comment gets lost and
doesn't appear when I run \lo_list


I think the comment-on-LO facility only works if you are superuser
(because it's hacking a system table, there not being any actual
COMMENT ON LARGE OBJECT command).


I hear what you say, but the psql manual specifically mentions that the
difference between the \lo_import command and the server-side lo_import
function is that the former "acts as the local user on the local file
system, rather than the server's user and file system". If this is the
case then why do they not specifically mention the superuser restriction
in the syntax.

To my mind this impies that this restriction (to be the superuser) does
not apply to the \lo_import command.

Further, the blob is loaded into pg_largeobject table, which surely, is a
system table.

--
Howard.
LANNet Computing Associates - Your Linux people <http://www.lannetlinux.com>
------------------------------------------
Flatter government, not fatter government - Get rid of the Australian states.
------------------------------------------
If all economists were laid end to end, they would not reach a conclusion
- George Bernard Shaw
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly

Nov 11 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.