Re: Support for idempotent schema changes?

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-general(at)postgresql(dot)org
Cc: "David Lowe" <dlowe(at)airplay(dot)com>
Subject: Re: Support for idempotent schema changes?
Date: 2007-03-04 07:44:38
Message-ID: 200703040844.39308.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

David Lowe wrote:
> So how can I make statements of the form:

> * alter table only customers add constraint
> a_previously_missed_constraint unique (a, b, c);
>
> * add column points int4 not null default 0;

> idempotent?

You just ignore the error if the object already exists.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Stefan Kaltenbrunner 2007-03-04 08:31:44 Re: Configure can't find com_err on OpenBSD for --with-krb5
Previous Message Joshua D. Drake 2007-03-04 07:22:45 Re: PG Dump 8.2