Re: [GENERAL] Using psql on command line

Поиск
Список
Период
Сортировка
От Eric Marsden
Тема Re: [GENERAL] Using psql on command line
Дата
Msg-id m2ogsvap79.fsf@cook.onecert.fr
обсуждение исходный текст
Ответ на Using psql on command line  (Brian <signal@shreve.net>)
Список pgsql-general
>>>>> "Brian" == Brian  <signal@shreve.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

В списке pgsql-general по дате отправления:

Предыдущее
От: Brian
Дата:
Сообщение: Using psql on command line
Следующее
От: Jeremiah Davis
Дата:
Сообщение: Re: [GENERAL] Using psql on command line