Re: shell scripting

From: Björn Lundin <bjorn(dot)lundin(at)swipnet(dot)se>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: shell scripting
Date: 2002-09-21 19:46:24
Message-ID: amii81$2j1a$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Frank wrote:

> Hello,
>
> I am a PostgreSQL newbie stuck with the following question; can I write a
> unix shell script with sql statements and execute this in postgresql? In
> other databases one can use "@ /tmp/script.sql" or "start
> /path-to-script/script.sql". How can this be done in postgresql?
>
> tia,
>
> Frank
man psql

-c, --command query
Specifies that psql is to execute one query string,
query, and then exit. This is useful in shell
scripts.

/Björn

Browse pgsql-general by date

  From Date Subject
Next Message Lee Harr 2002-09-21 22:55:27 Re: executing sql statements from file
Previous Message patrick 2002-09-21 08:30:05 PostgreSQL consultanting oportiunity