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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-novice by date

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