Jan Wieck wieck at lists.slony.info
Thu Sep 13 07:20:31 PDT 2007
Update of /home/cvsd/slony1/slony1-engine/src/backend
In directory main.slony.info:/tmp/cvs-serv19909/src/backend

Modified Files:
      Tag: REL_1_2_STABLE
	slony1_funcs.sql 
Log Message:
Apparently somebody decided to make "query" a reserved keyword
in the plpgsql parser.

Jan


Index: slony1_funcs.sql
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/backend/slony1_funcs.sql,v
retrieving revision 1.98.2.22
retrieving revision 1.98.2.23
diff -C2 -d -r1.98.2.22 -r1.98.2.23
*** slony1_funcs.sql	5 Sep 2007 21:37:57 -0000	1.98.2.22
--- slony1_funcs.sql	13 Sep 2007 14:20:29 -0000	1.98.2.23
***************
*** 5957,5961 ****
    v_isorigin boolean;
    v_fqname text;
!   query text;
    v_rows integer;
    v_idxname text;
--- 5957,5961 ----
    v_isorigin boolean;
    v_fqname text;
!   v_query text;
    v_rows integer;
    v_idxname text;
***************
*** 5973,5983 ****
     v_fqname := ''"'' || p_nspname || ''"."'' || p_tabname || ''"'';
  -- Take out a lock on the table
!    query := ''lock '' || v_fqname || '';'';
!    execute query;
  
     if v_isorigin then
  	-- On the origin, verify that the table is empty, failing if it has any tuples
!         query := ''select 1 as tuple from '' || v_fqname || '' limit 1;'';
! 	execute query into prec;
          GET DIAGNOSTICS v_rows = ROW_COUNT;
  	if v_rows = 0 then
--- 5973,5983 ----
     v_fqname := ''"'' || p_nspname || ''"."'' || p_tabname || ''"'';
  -- Take out a lock on the table
!    v_query := ''lock '' || v_fqname || '';'';
!    execute v_query;
  
     if v_isorigin then
  	-- On the origin, verify that the table is empty, failing if it has any tuples
!         v_query := ''select 1 as tuple from '' || v_fqname || '' limit 1;'';
! 	execute v_query into prec;
          GET DIAGNOSTICS v_rows = ROW_COUNT;
  	if v_rows = 0 then
***************
*** 5988,5993 ****
     else
  	-- On other nodes, TRUNCATE the table
!         query := ''truncate '' || v_fqname || '';'';
! 	execute query;
     end if;
  -- If p_idxname is NULL, then look up the PK index, and RAISE EXCEPTION if one does not exist
--- 5988,5993 ----
     else
  	-- On other nodes, TRUNCATE the table
!         v_query := ''truncate '' || v_fqname || '';'';
! 	execute v_query;
     end if;
  -- If p_idxname is NULL, then look up the PK index, and RAISE EXCEPTION if one does not exist



More information about the Slony1-commit mailing list