Re: simple code cleanups

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: simple code cleanups
Дата
Msg-id 20020219180907.X94417-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на simple code cleanups  (Neil Conway <nconway@klamath.dyndns.org>)
Ответы Re: simple code cleanups  (Neil Conway <nconway@klamath.dyndns.org>)
Список pgsql-patches
On 19 Feb 2002, Neil Conway wrote:

> I was taking a look at making ALTER TABLE ... RENAME work with
> referential integrity constraints. While doing so, I cleaned up a few
> spots of code along the way (mostly just adding 'const' qualifiers to
> char* params) -- only the change in rename.c is slightly noteworthy.
> Unless anyone sees any problems, please apply for 7.3.
>
> As for the ALTER TABLE ... RENAME stuff, I gave up for the moment --
> next I think I'm going to try changing the referential integrity code to
> use oids rather than relation names, so that should kill 2 birds with
> one stone (since changing RI to use OIDs is also on the TODO list, and
> the OID doesn't change when a relation or attribute is renamed).
> Suggestions/advice are welcome.

You have to be careful about changing the RI constraints to use oids
because you'll need to support restores from systems where the constraint
was dumped with names, so you can't simply make it take oids only.  In
addition, the triggers should probably take attnos for the attributes
rather than names.  I'd been figuring on making new functions that took
oids/attnos and changing dumping so that over time the old functions would
eventually stop being used (such as using alter table to dump the
constraints) and internally have the old functions end up being wrappers
around the new ones.

I'd been planning to start doing a bunch of work on the trigger functions
now that 7.3 development's started.  I was hoping to put together a high
level plan of attack for hackers this week to see what the response was.



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

Предыдущее
От: Neil Conway
Дата:
Сообщение: simple code cleanups
Следующее
От: Neil Conway
Дата:
Сообщение: Re: simple code cleanups