Re: [GENERAL] Using psql on command line

From: Eric Marsden <emarsden(at)mail(dot)dotcom(dot)fr>
To: Brian <signal(at)shreve(dot)net>
Cc: pgsql-general(at)postgreSQL(dot)org
Subject: Re: [GENERAL] Using psql on command line
Date: 1998-09-04 15:10:34
Message-ID: m2ogsvap79.fsf@cook.onecert.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

>>>>> "Brian" == Brian <signal(at)shreve(dot)net> writes:

Brian> I would like to run a cron job nightly to vaccuum a few
Brian> databases, but how do you execute from just a command line? I
Brian> tried like:
Brian>
Brian> psql mydb < vacuum
Brian> psql mydb | vacuum

One of

~$ echo "vacuum" | psql mydb
~$ psql mydb -c "vacuum"

Note that you'll have to be careful about the environment of the user
which is running the cron jobs (PGDATA etc).

--
Eric Marsden
emarsden @ mail.dotcom.fr
It's elephants all the way down

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jeremiah Davis 1998-09-04 15:20:47 Re: [GENERAL] Using psql on command line
Previous Message The Hermit Hacker 1998-09-04 15:01:27 Re: [HACKERS] Re: CIDR/IP types. Was: [GENERAL] big numbers]