Skip to content

disable_partitioning() - DROP TRIGGER instead DROP FUNCTION #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
rnz opened this issue Apr 8, 2016 · 2 comments
Closed

disable_partitioning() - DROP TRIGGER instead DROP FUNCTION #4

rnz opened this issue Apr 8, 2016 · 2 comments

Comments

@rnz
Copy link

rnz commented Apr 8, 2016

select disable_partitioning('test_items');

ЗАМЕЧАНИЕ:  функция test_schema.test_items_insert_trigger_func() не существует, пропускается
CONTEXT:  SQL-оператор: "DROP FUNCTION IF EXISTS test_schema.test_items_insert_trigger_func() CASCADE"
функция PL/pgSQL disable_partitioning(text), строка 6, оператор EXECUTE
Total query runtime: 142 msec
1 row retrieved.

Может-быть здесь ожидался DROP TRIGGER, а не DROP FUNCTION?

Примечание: расширение установлено в pg9.5 из branch'а pgpro9_5.

@zilder
Copy link
Collaborator

zilder commented Apr 8, 2016

Ключевое слово CASCADE позволяет удалить и функцию и триггер одним вызовом.
Здесь проблема связана с именем функции. disable_partitionioning пытается удалить несуществующую функцию: для хеш-партицирования она должна называться test_items_hash_insert_trigger_func. Я исправлю это в ближайшее время.

@zilder
Copy link
Collaborator

zilder commented Apr 11, 2016

Выложил обновление в ветки master и pgpro9_5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants