Thu Apr 14 11:26:03 PDT 2005
- Previous message: [Slony1-commit] By cbbrowne: Add a whole bunch of index entries to admin guide to make
- Next message: [Slony1-commit] By wieck: Updated Copyright to 2003-2005 PGDG Jan
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Log Message:
-----------
This should fix adding a table to a set with a unique index instead of a PK. If the index had a name like "name.key_idx" the key couldnt be found.
Modified Files:
--------------
slony1-engine/src/backend:
slony1_funcs.sql (r1.60 -> r1.61)
-------------- next part --------------
Index: slony1_funcs.sql
===================================================================
RCS file: /usr/local/cvsroot/slony1/slony1-engine/src/backend/slony1_funcs.sql,v
retrieving revision 1.60
retrieving revision 1.61
diff -Lsrc/backend/slony1_funcs.sql -Lsrc/backend/slony1_funcs.sql -u -w -r1.60 -r1.61
--- src/backend/slony1_funcs.sql
+++ src/backend/slony1_funcs.sql
@@ -4428,7 +4428,7 @@
and PGX.indrelid = PGC.oid
and PGX.indexrelid = PGXC.oid
and PGX.indisunique
- and PGXC.relname = p_idx_name;
+ and @NAMESPACE at .slon_quote_brute(PGXC.relname) = @NAMESPACE at .slon_quote_input(p_idx_name);
if not found then
raise exception ''Slony-I: table % has no unique index %'',
v_tab_fqname_quoted, p_idx_name;
@@ -4510,7 +4510,7 @@
v_attfound bool;
begin
v_tab_fqname_quoted := @NAMESPACE at .slon_quote_input(p_tab_fqname);
- v_idx_name_quoted := @NAMESPACE at .slon_quote_input(p_idx_name);
+ v_idx_name_quoted := @NAMESPACE at .slon_quote_brute(p_idx_name);
--
-- Ensure that the table exists
--
@@ -4541,10 +4541,10 @@
and PGX.indrelid = PGC.oid
and PGX.indexrelid = PGXC.oid
and PGX.indisunique
- and @NAMESPACE at .slon_quote_brute(PGXC.relname::text) = v_idx_name_quoted;
+ and @NAMESPACE at .slon_quote_brute(PGXC.relname) = v_idx_name_quoted;
if not found then
raise exception ''Slony-I: table % has no unique index %'',
- v_tab_fqname_quoted, p_idx_name;
+ v_tab_fqname_quoted, v_idx_name_quoted;
end if;
end if;
- Previous message: [Slony1-commit] By cbbrowne: Add a whole bunch of index entries to admin guide to make
- Next message: [Slony1-commit] By wieck: Updated Copyright to 2003-2005 PGDG Jan
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-commit mailing list