running a SQL command at startup time

From: Alexis Beuraud <alexis(at)siatel(dot)com>
To: "'pgsql-admin(at)postgresql(dot)org'" <pgsql-admin(at)postgresql(dot)org>
Subject: running a SQL command at startup time
Date: 2007-10-17 09:05:22
Message-ID: 20071017094445.59E779FB981@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Moiz Kothari 2007-10-17 10:36:11 Re: when inserting to table, text type parameter become NULL (after big assignment to this parameter)
Previous Message Dennis, Allan 2007-10-16 22:24:20 Re: pg_ctl start doesn't daemonize properly