> 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