Re: Send parameters using Shell script to PostgreSQL - Mailing list pgsql-novice

From Aarni
Subject Re: Send parameters using Shell script to PostgreSQL
Date
Msg-id 201012281643.21905.aarni@kymi.com
Whole thread Raw
In response to Re: Send parameters using Shell script to PostgreSQL  (wolfang <wolfang83@hotmail.com>)
Responses Re: Send parameters using Shell script to PostgreSQL  (wolfang <wolfang83@hotmail.com>)
List pgsql-novice
On Tuesday 28 December 2010 16:03:16 wolfang wrote:
> Thanks Aarni but I tried with double quote and have the same result,
>  returned to me the same message of error.
>
Hi Wolfgang,

I tried this ok on Pg8.3:

[postgres@kymicentos ~]$/usr/local/pgsql/bin/psql -f test_insert.sql -v
v_archivo="'/home/postgres/test_insert.txt'" -d test_x

My test_insert.sql has a single line and a command:

COPY persons FROM :v_archivo WITH DELIMITER '|';

So is your path right and the file really exists?

BR,

Aarni
--
Aarni Ruuhimäki
--------------
This is a bug-free broadcast from Ubuntu 9.10
Karmic Koala Linux System

PROUD TO BE 100% Microsoft FREE!

pgsql-novice by date:

Previous
From: wolfang
Date:
Subject: Re: Send parameters using Shell script to PostgreSQL
Next
From: Tom Lane
Date:
Subject: Re: batching commands with libpq