Do not force DROP FUNCTION but rely on CREATE OR REPLACE

We'll bet on no old signature being left around.

Presence of an old signature would break at runtime
with a message like:
ERROR:  function CDB_UserTables() is not unique

Closes #25
master
Sandro Santilli 10 years ago
parent eecab6e24c
commit 0082138503

@ -27,7 +27,7 @@ $$ LANGUAGE 'sql' IMMUTABLE STRICT;
-- as the extent. -- as the extent.
-- --
-- --
DROP FUNCTION IF EXISTS CDB_HexagonGrid(ext GEOMETRY, side FLOAT8); -- DROP FUNCTION IF EXISTS CDB_HexagonGrid(ext GEOMETRY, side FLOAT8);
CREATE OR REPLACE FUNCTION CDB_HexagonGrid(ext GEOMETRY, side FLOAT8, origin GEOMETRY DEFAULT NULL) CREATE OR REPLACE FUNCTION CDB_HexagonGrid(ext GEOMETRY, side FLOAT8, origin GEOMETRY DEFAULT NULL)
RETURNS SETOF GEOMETRY RETURNS SETOF GEOMETRY
AS $$ AS $$

@ -5,7 +5,7 @@
-- --
-- Currently accepted permissions are: 'public', 'private' or 'all' -- Currently accepted permissions are: 'public', 'private' or 'all'
-- --
DROP FUNCTION IF EXISTS CDB_UserTables(); -- replaced by: -- DROP FUNCTION IF EXISTS CDB_UserTables(); -- replaced by:
CREATE OR REPLACE FUNCTION CDB_UserTables(perm text DEFAULT 'all') CREATE OR REPLACE FUNCTION CDB_UserTables(perm text DEFAULT 'all')
RETURNS SETOF information_schema.sql_identifier RETURNS SETOF information_schema.sql_identifier
AS $$ AS $$

Loading…
Cancel
Save