Skip site navigation (1) Skip section navigation (2)

Re: Send parameters using Shell script to PostgreSQL

From: Aarni <aarni(at)kymi(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: Send parameters using Shell script to PostgreSQL
Date: 2010-12-28 14:43:21
Message-ID: 201012281643.21905.aarni@kymi.com (view raw or flat)
Thread:
Lists: 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(at)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!

In response to

Responses

pgsql-novice by date

Next:From: Tom LaneDate: 2010-12-28 16:16:44
Subject: Re: batching commands with libpq
Previous:From: wolfangDate: 2010-12-28 14:03:16
Subject: Re: Send parameters using Shell script to PostgreSQL

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group