pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jasen Betts <jasen@xnet.co.nz>
To: pgsql-sql@postgresql.org
Subject: Re: lo_import
Date: 3 Jan 2012 19:17:33 GMT
Message-ID: <jdvk8d$keo$1@reversiblemaps.ath.cx> (raw)
References: <4EF9AFC2.3090204@sygecom.com.br>
	<4F02F544.9070506@sygecom.com.br>

On 2012-01-03, Maurício Cruz <cruz@sygecom.com.br> 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




view thread (3+ messages)

Message-ID: <jdvk8d$keo$1@reversiblemaps.ath.cx>
Permalink:  ../jdvk8d$keo$1@reversiblemaps.ath.cx/
Also on:    postgresql.org/message-id/jdvk8d$keo$1@reversiblemaps.ath.cx

 · 

reply

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-sql@postgresql.org
  Cc: jasen@xnet.co.nz
  Subject: Re: lo_import
  In-Reply-To: <jdvk8d$keo$1@reversiblemaps.ath.cx>

* 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