Re: Alter Columns with Triggers - Mailing list pgsql-general

From Craig Ringer
Subject Re: Alter Columns with Triggers
Date
Msg-id 4E1CE242.2000506@postnewspapers.com.au
Whole thread Raw
In response to Alter Columns with Triggers  (Adrian Parker <adrian.l.parker@gmail.com>)
List pgsql-general
On 12/07/2011 9:23 AM, Adrian Parker wrote:
> Is there a quick and easy fix? Currently I'm copying/pasting the
> drop/create statements from pgadmin (its very slow and error prone)
> and putting them in my python source.
>
I don't know about "quick and easy", but you can get the trigger
function sources from pg_catalog  using your Python program. The
argument types and function names are also there, which gives you enough
information to programmatically generate CREATE and DROP statements for
the functions, as well as ALTER TABLE functions to add and remove the
triggers.

As for dependencies: doesn't PL/PgSQL only check the existence of
functions called, etc, once a procedure is actually executed? I can't
remember for sure, but it might not prove to be an issue.

--
Craig Ringer

POST Newspapers
276 Onslow Rd, Shenton Park
Ph: 08 9381 3088     Fax: 08 9388 2258
ABN: 50 008 917 717
http://www.postnewspapers.com.au/

pgsql-general by date:

Previous
From: Craig Ringer
Date:
Subject: Re: help for xml create in postgresql
Next
From: Craig Ringer
Date:
Subject: Re: No suitable driver found for jdbc:postgresql [error]