From: Tom Lane <tgl@sss.pgh.pa.us>
To: Nelson Gonzaga <ngonzaga@yahoo.com>
Cc: pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>
Subject: Re: Grant on lo_export()
Date: Wed, 01 Aug 2018 10:06:06 -0400
Message-ID: <27170.1533132366@sss.pgh.pa.us> (raw)
In-Reply-To: <1160328940.343057.1533121961953@mail.yahoo.com>
References: <1160328940.343057.1533121961953.ref@mail.yahoo.com>
<1160328940.343057.1533121961953@mail.yahoo.com>
Nelson Gonzaga <ngonzaga@yahoo.com> writes:
> 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: must be superuser to use server-side lo_export()
> SQL state:42501
> Hint:Anyone can use the client-side lo_export() provided by libpq.
The error message means exactly what it says.
As of v11 it'll be possible to grant usage of lo_export() to
non-superusers, but in all released branches that check is hard-wired.
Note that since you can use that function to overwrite PG data or config
files, granting use of it to someone you wouldn't trust with full
superuser would be a damfool idea anyway.
regards, tom lane
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: tgl@sss.pgh.pa.us, ngonzaga@yahoo.com, pgsql-admin@lists.postgresql.org
Subject: Re: Grant on lo_export()
In-Reply-To: <27170.1533132366@sss.pgh.pa.us>
* 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