Re: about truncate
От | Bruce Momjian |
---|---|
Тема | Re: about truncate |
Дата | |
Msg-id | 200812301936.mBUJaHT23768@momjian.us обсуждение исходный текст |
Ответ на | Re: about truncate (David Fetter <david@fetter.org>) |
Список | pgsql-hackers |
David Fetter wrote: > > My vote is to just go ahead and change it. I don't really see much > > of a use-case for truncating only the parent of an inheritance > > hierarchy anyway, so I doubt that many people would be affected. > > Here's one such use-case. Let's say a table has gotten large and > you've decided to partition it. You add child tables, add one or more > triggers to the parent table to make sure it never gets a row, > populate the child tables from the parent table, then you want to > remove all the rows from the parent table. > > TRUNCATE ONLY handles this case just fine, so long as there's a clear > message in the release notes. :) Agreed. The good thing is that I don't imagine what you have described above would be scripted so someone would be typing that and hopefully know the current behavior. -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + If your life is a hard drive, Christ can be your backup. +
В списке pgsql-hackers по дате отправления: