Re: Initialization on server start-up

From: Frank Bax <fbax(at)sympatico(dot)ca>
To: PostgreSQL List - Novice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Initialization on server start-up
Date: 2008-03-15 15:55:07
Message-ID: 47DBF15B.3040906@sympatico.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Alex du Plessis wrote:
> Is there a way to initialize a field in a table in a specific database
> on server startup?

Simple; just add something like this to a server startup script:

psql -c 'update table set field=value where ...' database user

or

echo 'update table set field=value where ...' | psql database user

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Weiwei Guo 2008-03-16 05:31:40 What is a password for?
Previous Message Bob McConnell 2008-03-15 15:10:12 Re: Initialization on server start-up