Alter Table vs. Rename/Create/Drop table with plpgsql functions.

Поиск
Список
Период
Сортировка
От Robert Perry
Тема Alter Table vs. Rename/Create/Drop table with plpgsql functions.
Дата
Msg-id 8A27D71C-CA88-4D33-9E19-F601A5E02526@lodestonetechnologies.com
обсуждение исходный текст
Ответы Re: Alter Table vs. Rename/Create/Drop table with plpgsql functions.  ("Mark R. Dingee" <mark.dingee@cox.net>)
Re: Alter Table vs. Rename/Create/Drop table with plpgsql functions.  (Jaime Casanova <systemguards@gmail.com>)
Re: Alter Table vs. Rename/Create/Drop table with plpgsql functions.  (Jaime Casanova <systemguards@gmail.com>)
Список pgsql-admin
     Perhaps I am just just a bit anal on this but some columns I
really like to have as the last columns of a table.  (usually
last_modby, last_modtime, type fields)  Thus when I need to add a
column to a table I am not happy just adding the column.  Instead I
go a little insane and rename the table, create the new table, copy
the data into the new table (with any require manipulations), change
all foreign key constraints to point to the new table, rebuild
plpgsql functions the user that table and finally drop the old table.

     The problem is the second to last. (rebuild plpgsql function)
These function are getting a little harder to find.  This DB has
hundreds if not thousands of functions and some of my table names are
a bit common. (e.g. item) My first of all I would really like a way
to tell postgresql to un cache all functions and let the cache
rebuild as need be.  I imagine restarting postgresql would do this,
but in my particular situation that has its' own problems associated
with it.

     Secondly does anyone know a way to insert a column instead of
appending a column to a table.  That way I could just avoid the
entire mess.

Thanks
Robert Perry

В списке pgsql-admin по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Changing the database cluster locale initialization
Следующее
От: "Mark R. Dingee"
Дата:
Сообщение: Re: Alter Table vs. Rename/Create/Drop table with plpgsql functions.