Re: lo_import - Mailing list pgsql-sql

From Jasen Betts
Subject Re: lo_import
Date
Msg-id jdvk8d$keo$1@reversiblemaps.ath.cx
Whole thread Raw
In response to Call a external app on postgreSQL start-up (windows)  (Maurício Cruz <cruz@sygecom.com.br>)
List pgsql-sql
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



pgsql-sql by date:

Previous
From: Tim Landscheidt
Date:
Subject: Re: lo_import
Next
From: rverghese
Date:
Subject: ignore unique violation OR check row exists