CVS User Account cvsuser
Fri Jun 10 22:11:22 PDT 2005
Log Message:
-----------
Backpatch:

Fix determineAttkindUnique() for 8.1. Apparently our stored procedure
relied on a bug in PostgreSQL. Returning NULL for an array index out
of bounds seems correct to me.

This also enables us to support 8.1 with the REL_1_0_STABLE branch.


Jan

Tags:
----
REL_1_0_STABLE

Modified Files:
--------------
    slony1-engine/src/backend:
        slony1_funcs.sql (r1.15.2.15 -> r1.15.2.16)
    slony1-engine/src/slonik:
        slonik.c (r1.27.2.6 -> r1.27.2.7)

-------------- next part --------------
Index: slony1_funcs.sql
===================================================================
RCS file: /usr/local/cvsroot/slony1/slony1-engine/src/backend/slony1_funcs.sql,v
retrieving revision 1.15.2.15
retrieving revision 1.15.2.16
diff -Lsrc/backend/slony1_funcs.sql -Lsrc/backend/slony1_funcs.sql -u -w -r1.15.2.15 -r1.15.2.16
--- src/backend/slony1_funcs.sql
+++ src/backend/slony1_funcs.sql
@@ -4138,7 +4138,7 @@
 		loop
 			select indkey[v_i] into v_attno from "pg_catalog".pg_index
 					where indexrelid = v_idxrow.indexrelid;
-			if v_attno = 0 then
+			if v_attno isnull or v_attno = 0 then
 				exit;
 			end if;
 			if v_attrow.attnum = v_attno then
Index: slonik.c
===================================================================
RCS file: /usr/local/cvsroot/slony1/slony1-engine/src/slonik/slonik.c,v
retrieving revision 1.27.2.6
retrieving revision 1.27.2.7
diff -Lsrc/slonik/slonik.c -Lsrc/slonik/slonik.c -u -w -r1.27.2.6 -r1.27.2.7
--- src/slonik/slonik.c
+++ src/slonik/slonik.c
@@ -1768,6 +1768,7 @@
 			switch (adminfo->version_minor)
 			{
 				case 0:
+				case 1:
 					use_major = 7;
 					use_minor = 4;
 					break;
@@ -1865,6 +1866,7 @@
 			switch (adminfo->version_minor)
 			{
 				case 0:
+				case 1:
 					use_major = 7;
 					use_minor = 4;
 					break;


More information about the Slony1-commit mailing list