pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alexis Beuraud <alexis@siatel.com>
To: 'pgsql-admin@postgresql.org' <pgsql-admin@postgresql.org>
Subject: running a SQL command at startup time
Date: Wed, 17 Oct 2007 11:05:22 +0200
Message-ID: <20071017094445.59E779FB981@postgresql.org> (raw)

Hello all

Is there a way to execute a SQL script whenever the Postgres server starts
up?
I would like to run the SQL command "analyze" at startup time. (I might use
more complicated scripts in the future).

I have not found any related entry in postgresql.conf.
I have been looking for the keywords init, startup in the FAQ and the
mailing lists but I have not found the answer.
Please provide an answer which would work both on Windows and Linux.
Regards,
Alexis



view thread (2+ messages)  latest in thread

Message-ID: <20071017094445.59E779FB981@postgresql.org>
Permalink:  ../20071017094445.59E779FB981@postgresql.org/
Also on:    postgresql.org/message-id/20071017094445.59E779FB981@postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: alexis@siatel.com
  Subject: Re: running a SQL command at startup time
  In-Reply-To: <20071017094445.59E779FB981@postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox