Re: create or replace rule/view (fwd)
От | Neil Conway |
---|---|
Тема | Re: create or replace rule/view (fwd) |
Дата | |
Msg-id | 8765xudaug.fsf@mailbox.samurai.com обсуждение исходный текст |
Ответ на | Re: create or replace rule/view (fwd) (Rod Taylor <rbt@zort.ca>) |
Ответы |
Re: create or replace rule/view (fwd)
Re: create or replace rule/view (fwd) |
Список | pgsql-patches |
Rod Taylor <rbt@zort.ca> writes: > REPLACE VIEW shouldn't change the visible structure at all. It defeats > the purpose. So what changes to the view should be allowed? Adding new attributes, but not removing any or changing the properties of an attribute? (e.g. data type). In which case, the logic would be: - construct TupleDesc based on ColumnDefs in view definition - spin through the pg_attribute tuples that match the relid of the view we're replacing - if we find a pg_attribute tuple that is not in the TupleDesc, bail out - if we find a pg_attribute tuple that is in the TupleDesc but has a different data-type (or other properties), bail out - if we find a TupleDesc attr that is not in pg_attribute, add it to pg_atribute Just want to make sure I understand Rod/Tom's objection before I implement anything. (BTW, Gavin asked me to finish off the patch for him -- I'd like to see this in 7.3....) Cheers, Neil -- Neil Conway <neilc@samurai.com> || PGP Key ID: DB3C29FC
В списке pgsql-patches по дате отправления: