Re: conditional alter table add ?

From: "Peter Childs" <peterachilds(at)gmail(dot)com>
To: "Lothar Behrens" <lothar(dot)behrens(at)lollisoft(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: conditional alter table add ?
Date: 2007-10-25 11:15:14
Message-ID: a2de01dd0710250415y4b96decfwdb7f0006d81c149e@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 17/10/2007, Lothar Behrens <lothar(dot)behrens(at)lollisoft(dot)de> wrote:
>
> Hi,
>
> I do convert an UML XMI model to a database script to create the
> database schema.
> To enable multiple iterations I need conditional alter table add
> column like syntax.
>
> Is there any way to do this ?

Not easily in a straight forward sql script. your going to need to write
your script in a scripting language (like perl, python or ruby) then do the
alter table query dependent
on other queries to the database,

Peter.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Gregory Stark 2007-10-25 11:20:40 Re: [PGSQL v8.2.5] Similar queries behave differently
Previous Message Garry Saddington 2007-10-25 11:11:59 execute pg_dump via python