From: Nelson Gonzaga <ngonzaga@yahoo.com>
To: pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>
Subject: Grant on lo_export()
Date: Wed, 1 Aug 2018 11:12:41 +0000 (UTC)
Message-ID: <1160328940.343057.1533121961953@mail.yahoo.com> (raw)
References: <1160328940.343057.1533121961953.ref@mail.yahoo.com>
Hi all,I'm trying to use lo_import / lo_export and apparently I have permission denied:
command:select lo_export(oid_imagem, '/tmp2/erro_export1.png') fromimagem where nome_imagem = 'erro';
ERROR: mustbe superuser to use server-side lo_export()SQL state:42501Hint:Anyone can use the client-side lo_export() provided by libpq.
It's okay when I enter the data as superuser like this:insert into image (image_name, oid_picture) values ('error1', lo_import ('/ tmp2 / erro.png'));
and the table:create table image (image_name varchar (20), oid_image oid);
I Use Linux Debian 7 and Postgresql 9.4
Any idea?
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: ngonzaga@yahoo.com, pgsql-admin@lists.postgresql.org
Subject: Re: Grant on lo_export()
In-Reply-To: <1160328940.343057.1533121961953@mail.yahoo.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox