Re: alter table drop column status - Mailing list pgsql-hackers

From Christopher Kings-Lynne
Subject Re: alter table drop column status
Date
Msg-id GNELIHDDFBOCMGBFGEFOIEGMCBAA.chriskl@familyhealth.com.au
Whole thread Raw
In response to Re: alter table drop column status  (Kovacs Zoltan <kovacsz@pc10.radnoti-szeged.sulinet.hu>)
List pgsql-hackers
> IMHO first at least a LOCK should be executed on all tables which are in
> any reference with "mytable". If LOCK is not enough, the entire database
> should be locked (in pg_hba.conf) for all users except for the maintainer.

Yep.

> I'm afraid LOCK is not available inside a PLPGSQL function (I write almost
> everything in PLPGSQL). However, a shell script should do this easily, but
> it's no so smart to call a shell script from a PLPGSQL function (although
> I do this some time), if Cristopher would like to use it with a single
> SELECT.

Hmmm - can LOCKs in PLPGSQL be added in 7.3, or are there reasons it's
difficult?

I'd love to publish a contrib of 'Chris's DDL functions' like:

alter_column_null(table, column, state)
drop_column(table, column)
drop_foreign_key(table, keyname)

etc.

So that people can use these in lieu of them being available natively in
postgres.

I guess they could be written in C - but then you may as well implement them
properly!

Chris




pgsql-hackers by date:

Previous
From: Kovacs Zoltan
Date:
Subject: Re: alter table drop column status
Next
From: Turbo Fredriksson
Date:
Subject: License question