X-Original-To: pgsql-admin-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id B88E79FB389; Mon, 11 Sep 2006 06:39:10 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 55254-04; Mon, 11 Sep 2006 06:38:41 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- X-Greylist: from auto-whitelisted by SQLgrey- Received: from svana.org (svana.org [125.62.87.134]) by postgresql.org (Postfix) with ESMTP id 563BA9FB376; Mon, 11 Sep 2006 06:38:41 -0300 (ADT) Received: from kleptog by svana.org with local (Exim 4.50) id 1GMiF9-0004Hc-Ej; Mon, 11 Sep 2006 19:38:19 +1000 Date: Mon, 11 Sep 2006 11:38:19 +0200 From: Martijn van Oosterhout To: Purusothaman A Cc: "Milen A. Radev" , pgsql-admin@postgresql.org, pgsql-general@postgresql.org Subject: Re: [GENERAL] Problem with lo_export() and lo_import() from remote machine. Message-ID: <20060911093819.GA15769@svana.org> Reply-To: Martijn van Oosterhout Mail-Followup-To: Purusothaman A , "Milen A. Radev" , pgsql-admin@postgresql.org, pgsql-general@postgresql.org References: <3650d0d50609090407j237bb710h9bde1675c773925d@mail.gmail.com> <3650d0d50609090449q2aec1098xc3b62dd169de5843@mail.gmail.com> <20060909120613.GA10336@svana.org> <3650d0d50609110215j7361bc2dj55e6d7d73af1d07d@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="+HP7ph2BbKc20aGI" Content-Disposition: inline In-Reply-To: <3650d0d50609110215j7361bc2dj55e6d7d73af1d07d@mail.gmail.com> X-PGP-Key-ID: Length=1024; ID=0x0DC67BE6 X-PGP-Key-Fingerprint: 295F A899 A81A 156D B522 48A7 6394 F08A 0DC6 7BE6 X-PGP-Key-URL: User-Agent: Mutt/1.5.9i X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: kleptog@svana.org X-SA-Exim-Scanned: No (on svana.org); SAEximRunCond expanded to false X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.084 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200609/82 X-Sequence-Number: 22996 --+HP7ph2BbKc20aGI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Short answer, you can't. The database server can obviously only access things on the database server. Since SQL is also executed on the server, no SQL statements can access stuff on the client computer. If you want to load a file on the client side to the server, you need to open the file and copy it over using the lo_ functions. There no way (IIRC) to access the contents of large objects from just SQL. Hope this helps, =20 On Mon, Sep 11, 2006 at 02:45:10PM +0530, Purusothaman A wrote: > Hi Martijn van Oosterhout, >=20 > Thanks for your valuable reply. >=20 > Yes I misunderstood the documentation. >=20 > Then, I searched PostgreSQL documentation for equivalent client-side > functions. > But I found only C programming APIs instead of SQL functions. >=20 > I want functions which is usable in SQL statements. >=20 > Can you give example or equivalent client side function syntax? >=20 > Thanks in advance. >=20 > :) > Purusothaman A >=20 >=20 >=20 >=20 > On 9/9/06, Martijn van Oosterhout wrote: > > > >On Sat, Sep 09, 2006 at 05:19:26PM +0530, Purusothaman A wrote: > >> I usually log in to postgresql server with admin username. > >> > >> But whatever its, according to documentation, if client machine's user > >has > >> write access > >> permission, this query should successfully be executed. > > > >Read carefully, you are using the server-side functions, therefore: > > > >"These two functions read and write files in the server's file system, > >using the permissions of the database's owning user." > > > >What your client user is is irrelevent. Perhaps you actually want to > >use the client-side functions? > > > >Have a nice day, > >-- > >Martijn van Oosterhout http://svana.org/kleptog/ > >> From each according to his ability. To each according to his ability to > >litigate. > > > > > >-----BEGIN PGP SIGNATURE----- > >Version: GnuPG v1.4.1 (GNU/Linux) > > > >iD8DBQFFAq41IB7bNG8LQkwRAsptAKCDSWuRI5T+JMqpWEQt7r69kJE6CwCfVTOO > >mOqGDNQBTZZDs4WVf6NM+wQ=3D > >=3DkT4s > >-----END PGP SIGNATURE----- > > > > > > --=20 Martijn van Oosterhout http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to l= itigate. --+HP7ph2BbKc20aGI Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFFBS6LIB7bNG8LQkwRAvI6AJ9OW7cxZiJR0QsEsSOwkYHKkYDZ6gCbBrDA GVPAoBeOhE+2toFa2zNbN3M= =9W8I -----END PGP SIGNATURE----- --+HP7ph2BbKc20aGI--