Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fkw1Z-0000yr-4H for pgsql-admin@arkaria.postgresql.org; Wed, 01 Aug 2018 18:39:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fkw1X-0001mc-Eo for pgsql-admin@arkaria.postgresql.org; Wed, 01 Aug 2018 18:39:03 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fkw1W-0001mV-3I for pgsql-admin@lists.postgresql.org; Wed, 01 Aug 2018 18:39:03 +0000 Received: from sonic301-8.consmr.mail.ne1.yahoo.com ([66.163.184.241]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fkw1R-0005Ar-Jn for pgsql-admin@lists.postgresql.org; Wed, 01 Aug 2018 18:39:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1533148729; bh=6iSMDKz94FMkkZY/6oEeW8+6kbauZUtH7J029cqXTWs=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From:Subject; b=Ny+a/xh1+ACh20Zn0N8AI9QHisEDmUCC5pcuSe5MK9tD6kB9FpkKtG7HNtctUamQb5z5SGb53zJwGXB3fG/xcRzHZlxkBR3v1lyLMVYRT+XxGlYy25dCtvyFfEabUGdsx4a65DAxCAIytz9VS5Vlfifp4JHjDsw14VFWRPyi/1uqpP1vN0nYHKthHOW3Exqz8IGis06Mtj5ayUV/Q5ZpORzgWWTn0akOEYRYfWgZNEF1rHcv2zX6F3MdxxEo5i18T8v7Fvu0FtauVsE4J7w7dar6sBss8iqDj//beWsh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WDnxVnYI- Received: from sonic.gate.mail.ne1.yahoo.com by sonic301.consmr.mail.ne1.yahoo.com with HTTP; Wed, 1 Aug 2018 18:38:49 +0000 Date: Wed, 1 Aug 2018 18:34:46 +0000 (UTC) From: Nelson Gonzaga To: Tom Lane Cc: "pgsql-admin@lists.postgresql.org" Message-ID: <1115222796.574920.1533148486880@mail.yahoo.com> In-Reply-To: <27170.1533132366@sss.pgh.pa.us> References: <1160328940.343057.1533121961953.ref@mail.yahoo.com> <1160328940.343057.1533121961953@mail.yahoo.com> <27170.1533132366@sss.pgh.pa.us> Subject: Re: Grant on lo_export() MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_574919_484504796.1533148486879" X-Mailer: WebService/1.1.12206 YMailNorrin Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.84 Safari/537.36 Content-Length: 4024 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk ------=_Part_574919_484504796.1533148486879 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I understand that I have to use libpq for the lo_import command to work.bu= t I did not find .NET code to use this library.Is there an example? Or just= this in C ++ [1]? [1] https://www.postgresql.org/docs/current/static/lo-examplesect.html Em quarta-feira, 1 de agosto de 2018 11:06:43 BRT, Tom Lane escreveu: =20 =20 Nelson Gonzaga writes: > Hi all,I'm trying to use lo_import / lo_export and apparently I have perm= ission denied: > command:select lo_export(oid_imagem, '/tmp2/erro_export1.png') fromimagem= where nome_imagem =3D '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. =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 regards, tom lane =20 ------=_Part_574919_484504796.1533148486879 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I understand that I have to use libpq fo= r the lo_import command to work.
but I did not find .NET code to = use this library.
Is there an example? Or just this in C ++ [1]?<= /div>

[1] https://www.postgresql.org/docs/current/static= /lo-examplesect.html


=20
=20
Em quarta-feira, 1 de agosto de 2018 11:06:43 BRT, Tom = Lane <tgl@sss.pgh.pa.us> escreveu:


Nelson Gonzaga <ng= onzaga@yahoo.com> writes:

> Hi all,I'm trying to use lo_import / lo_export = and apparently I have permission denied:
> command:sel= ect lo_export(oid_imagem, '/tmp2/erro_export1.png') fromimagem where nome_i= magem =3D 'erro';
> ERROR: must be superuser to use se= rver-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 poss= ible 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 dat= a or config
files, granting use of it to someone you woul= dn't trust with full
superuser would be a damfool idea an= yway.

      &= nbsp;     regards, tom lane

------=_Part_574919_484504796.1533148486879--