X-Original-To: pgsql-admin-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id C1E629FB35A for ; Sat, 9 Sep 2006 08:34:41 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 78389-02-5 for ; Sat, 9 Sep 2006 11:34:32 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by postgresql.org (Postfix) with ESMTP id 4E53A9FB31A for ; Sat, 9 Sep 2006 08:34:18 -0300 (ADT) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1GM16A-0004LT-KN for pgsql-admin@postgresql.org; Sat, 09 Sep 2006 13:34:10 +0200 Received: from 85.187.136.11 ([85.187.136.11]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 09 Sep 2006 13:34:10 +0200 Received: from milen by 85.187.136.11 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 09 Sep 2006 13:34:10 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-admin@postgresql.org From: "Milen A. Radev" Subject: Re: Problem with lo_export() and lo_import() from remote machine. Date: Sat, 09 Sep 2006 14:34:03 +0300 Lines: 42 Message-ID: References: <3650d0d50609090407j237bb710h9bde1675c773925d@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 85.187.136.11 User-Agent: Mozilla Thunderbird 1.5.0.5 (Windows/20060719) In-Reply-To: <3650d0d50609090407j237bb710h9bde1675c773925d@mail.gmail.com> Cc: pgsql-general@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.498 tagged_above=0 required=5 tests=RCVD_NUMERIC_HELO, SPF_HELO_PASS, SPF_PASS X-Spam-Level: * X-Archive-Number: 200609/74 X-Sequence-Number: 22988 Purusothaman A написа: > Hi all, > > I have problem while using "lo_export()" and "lo_import()" from remote > system. > > eg: > **** > select lo_export(img_file, 'E:\\temp\\1001.jpg') from master where emp_id = > '1001'; > insert into master(img_file) values(lo_import('E:\\temp\\1001.jpg')) where > emp_id = '1001'; > > Here column "img_file" is OID data type. > > The above query works, if I enter from PostgreSQL server machine. > But the same query fails, if I enter from any other client machine in my > LAN. > > All other queries work well from remote machine, which do not deal OID data > type column. > > any suggestions would be appreciated. > Please, RTFM - http://www.postgresql.org/docs/current/static/lo-funcs.html Quote: "The server-side lo_import and lo_export functions behave considerably differently from their client-side analogs. These two functions read and write files in the server's file system, using the permissions of the database's owning user. Therefore, their use is restricted to superusers. In contrast, the client-side import and export functions read and write files in the client's file system, using the permissions of the client program. The client-side functions can be used by any PostgreSQL user." -- Milen A. Radev