Thu Oct 22 10:51:10 PDT 2009
- Previous message: [Slony1-commit] slony1-engine RELEASE config.h.in
- Next message: [Slony1-commit] slony1-engine/src/backend slony1_funcs.sql
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Update of /home/cvsd/slony1/slony1-engine/src/backend
In directory main.slony.info:/tmp/cvs-serv20454/src/backend
Modified Files:
Tag: REL_1_2_STABLE
slony1_funcs.sql
Log Message:
3 things...
1. Fix to problem with upgrades - need to emulate "DELETE FUNCTION IF EXISTS"
because:
- Old versions of PostgreSQL don't support that
- We have 2 functions that changed return type where
CREATE OR REPLACE FUNCTION fails due to the change in function signature
2. Mark 1.2.18
3. Add release notes for the above
Index: slony1_funcs.sql
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/backend/slony1_funcs.sql,v
retrieving revision 1.98.2.39
retrieving revision 1.98.2.40
diff -C2 -d -r1.98.2.39 -r1.98.2.40
*** slony1_funcs.sql 17 Aug 2009 17:39:57 -0000 1.98.2.39
--- slony1_funcs.sql 22 Oct 2009 17:51:08 -0000 1.98.2.40
***************
*** 431,435 ****
as '
begin
! return 17;
end;
' language plpgsql;
--- 431,435 ----
as '
begin
! return 18;
end;
' language plpgsql;
***************
*** 3758,3761 ****
--- 3758,3780 ----
'Prepare for DDL script execution on origin';
+
+ create or replace function @NAMESPACE at .drop_if_exists (text, text) returns integer as '
+ declare
+ p_function alias for $1;
+ p_args alias for $2;
+ v_drop text;
+ begin
+ if exists (select 1 from information_schema.routines where routine_schema = ''@NAMESPACE@'' and routine_name = p_function) then
+ v_drop := ''drop function '' || p_function || ''('' || p_args || '');'';
+ execute v_drop;
+ end if;
+ return 1;
+ end
+ ' language plpgsql;
+
+ comment on function @NAMESPACE at .drop_if_exists (text,text) is 'Emulate DROP FUNCTION IF EXISTS, which does not exist in 7.4, 8.0, 8.1';
+
+ select @NAMESPACE at .drop_if_exists ('ddlscript_complete', 'int4, text, int4');
+
-- perform @NAMESPACE at .ddlScript_int(p_set_id, p_script, p_only_on_node);
***************
*** 5436,5439 ****
--- 5455,5460 ----
'updateRelname(set_id, only_on_node)';
+ select @NAMESPACE at .drop_if_exists ('updatereloid', 'int4, int4');
+
-- ----------------------------------------------------------------------
-- FUNCTION updateReloid (set_id, only_on_node)
- Previous message: [Slony1-commit] slony1-engine RELEASE config.h.in
- Next message: [Slony1-commit] slony1-engine/src/backend slony1_funcs.sql
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-commit mailing list