Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 7D6CA116AE5C for ; Tue, 3 Jan 2012 15:31:49 -0400 (AST) Received: from lo.gmane.org ([80.91.229.12]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RiA5K-0007Ib-19 for pgsql-sql@postgresql.org; Tue, 03 Jan 2012 19:31:49 +0000 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RiA56-0004Qp-TF for pgsql-sql@postgresql.org; Tue, 03 Jan 2012 20:31:32 +0100 Received: from ip-118-90-27-196.xdsl.xnet.co.nz ([118.90.27.196]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 03 Jan 2012 20:31:32 +0100 Received: from jasen by ip-118-90-27-196.xdsl.xnet.co.nz with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 03 Jan 2012 20:31:32 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-sql@postgresql.org From: Jasen Betts Subject: Re: lo_import Date: 3 Jan 2012 19:17:33 GMT Organization: Dis (not Dat) Organisation Lines: 27 Message-ID: References: <4EF9AFC2.3090204@sygecom.com.br> <4F02F544.9070506@sygecom.com.br> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: ip-118-90-27-196.xdsl.xnet.co.nz X-Face: ?)Aw4rXwN5u0~$nqKj`xPz>xHCwgi^q+^?Ri*+R(&uv2=E1Q0Zk(>h!~o2ID@6{uf8s; a +M[5[U[QT7xFN%^gR"=tuJw%TXXR'Fp~W; (T"1(739R%m0Yyyv*gkGoPA.$b,D.w:z+<'"=-lVT?6 {T?=R^:W5g|E2#EhjKCa+nt":4b}dU7GYB*HBxn&Td$@f%.kl^:7X8rQWd[NTc"P"u6nkisze/Q; 8 "9Z{peQF,w)7UjV$c|RO/mQW/NMgWfr5*$-Z%u46"/00mx-,\R'fLPe.)^ User-Agent: slrn/pre1.0.0-18 (Linux) X-Pg-Spam-Score: -6.0 (------) X-Archive-Number: 201201/10 X-Sequence-Number: 36181 On 2012-01-03, Maurício Cruz wrote: > Hi all, > > I'm trying to use lo_import to import a file into my database, if I > execute from postgres runing in my local machine > it works perfectly, but if I do it in the postgres runing in the server, > it says "No such file or directory" > > I Guess postgres only see file on the machine it is runing and not > through the network... It can only see the files the database server can see. > I will have to upload the file into the server and then use import ? that would work > is there any other way ? the "\lo_import" command in psql, which reads files as the current user anp pushes them through the database connection. the best way is probably to add the file import feature to your appplication. -- ⚂⚃ 100% natural