diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-02-03 19:33:42 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-02-04 07:50:52 +0200 |
commit | 86ebfe39caf2c47dd63c0a3883d9d744eaa2f979 (patch) | |
tree | 75eea8c6ed4aaaa0ec9f4e77d07bdbc654f61eeb | |
parent | b80e01f36153981b586c31118fe394dda8ea4cc9 (diff) |
Remove redundant DROP FUNCTION statement (casues error on older PostgreSQL)
-rw-r--r-- | brep/package-extra.sql | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/brep/package-extra.sql b/brep/package-extra.sql index 9a847e3..823c3af 100644 --- a/brep/package-extra.sql +++ b/brep/package-extra.sql @@ -8,7 +8,15 @@ -- * strings other then function bodies must be quoted with ' or " -- * statements must end with ";\n" -- -DROP FUNCTION IF EXISTS to_tsvector(IN document weighted_text); + +-- There is no need to drop to_tsvector() explicitly, as we can rely on "DROP +-- TYPE IF EXISTS weighted_text CASCADE" statement below, which will drop all +-- objects that depend on this type. Moreover this DROP FUNCTION statement will +-- fail for old versions of PostgreSQL (experienced for 9.2.14) with error: +-- type "weighted_text" does not exist. +-- +-- DROP FUNCTION IF EXISTS to_tsvector(IN document weighted_text); +-- DROP FUNCTION IF EXISTS search_packages(IN query tsquery, INOUT name TEXT); DROP FUNCTION IF EXISTS search_latest_packages(IN query tsquery); DROP FUNCTION IF EXISTS latest_package(INOUT name TEXT); |