Re: autocommit vs TRUNCATE et al
От | Joe Conway |
---|---|
Тема | Re: autocommit vs TRUNCATE et al |
Дата | |
Msg-id | 3DB4E156.8090701@joeconway.com обсуждение исходный текст |
Ответ на | autocommit vs TRUNCATE et al (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: autocommit vs TRUNCATE et al
|
Список | pgsql-hackers |
Tom Lane wrote:> We can go with the auto-COMMIT idea for statements that are invoked at> the outer interactive level, butthat doesn't work for stuff invoked> inside a function. I think we need to forbid these statements inside> functions,too. We already have that for VACUUM, because of its> internal commits causing problems for functions, but we'llneed to> extend it to all of them.>> Just FYI, the statements involved are> VACUUM> TRUNCATE TABLE> CREATE/DROP DATABASE I just noticed that this afternoon's changes cause dblink's regression test to fail due to: CREATE OR REPLACE FUNCTION conditional_drop() [...] IF FOUND THEN DROP DATABASE regression_slave; END IF; [...] ' LANGUAGE 'plpgsql'; SELECT conditional_drop(); I'm wondering what is the best alternative? Should we simply do a "DROP DATABASE regression_slave;" and have the expected results include the 'database "regression_slave" does not exist'? In this case there would be an expected failure whenever the regression test was run more than once. Joe
В списке pgsql-hackers по дате отправления: