Re: ERROR: relation xxx is still open (Re: Use Trigger to Remove Table ... )
В списке pgsql-general по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: ERROR: relation xxx is still open (Re: Use Trigger to Remove Table ... ) |
| Дата | |
| Msg-id | 6384.1265127080@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | ERROR: relation xxx is still open (Re: Use Trigger to Remove Table ... ) (Josh Kupershmidt <schmiddy@gmail.com>) |
| Список | pgsql-general |
Josh Kupershmidt <schmiddy@gmail.com> writes:
> For the record, I think having a trigger drop a table automatically when
> it's empty is probably a bad idea. But I tried it out anyways, and got a
> surprising:
> ERROR: relation 16400 is still open
> when the trigger function attempted to drop the table.
> Can anyone say whether the error message I'm seeing is valid?
It's unsurprising, anyway. The code firing the trigger would be holding
the relation open. I'm not sure whether there's a good reason for
referring to the table by OID instead of name there, but this is a
pretty low-level failure anyway.
There are any number of reasons why we'd not be likely to try to support
this. What if the trigger tries to refer to NEW or OLD afterwards, when
the information about the table's rowtype is already gone? What if
there are more trigger firings pending for the table?
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера