Index: openacs-4/packages/acs-kernel/acs-kernel.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/acs-kernel.info,v
diff -u -r1.139 -r1.140
--- openacs-4/packages/acs-kernel/acs-kernel.info	17 Sep 2017 11:38:28 -0000	1.139
+++ openacs-4/packages/acs-kernel/acs-kernel.info	5 Oct 2017 09:33:45 -0000	1.140
@@ -9,15 +9,15 @@
     <implements-subsite-p>f</implements-subsite-p>
     <inherit-templates-p>t</inherit-templates-p>
     
-    <version name="5.10.0d2" url="http://openacs.org/repository/download/apm/acs-kernel-5.10.0d2.apm">
+    <version name="5.10.0d3" url="http://openacs.org/repository/download/apm/acs-kernel-5.10.0d3.apm">
         <owner url="mailto:oct@openacs.org">OpenACS Core Team</owner>
         <summary>Routines and data models providing the foundation for OpenACS-based Web services.</summary>
         <release-date>2017-08-06</release-date>
         <vendor url="http://openacs.org">OpenACS</vendor>
         <description format="text/html">The OpenACS kernel contains the core datamodel create and drop scripts for such things as objects, groups, partiies and the supporting PL/SQL and PL/pgSQL procedures.</description>
         <maturity>3</maturity>
 
-        <provides url="acs-kernel" version="5.10.0d2"/>
+        <provides url="acs-kernel" version="5.10.0d3"/>
 
         <callbacks>
         </callbacks>
Index: openacs-4/packages/acs-kernel/sql/postgresql/utilities-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/postgresql/utilities-create.sql,v
diff -u -r1.9 -r1.10
--- openacs-4/packages/acs-kernel/sql/postgresql/utilities-create.sql	7 Aug 2017 23:47:56 -0000	1.9
+++ openacs-4/packages/acs-kernel/sql/postgresql/utilities-create.sql	5 Oct 2017 09:33:46 -0000	1.10
@@ -289,13 +289,12 @@
 --
 -- procedure util__get_primary_keys/1
 --
-CREATE OR REPLACE FUNCTION util__get_primary_keys(
-   p_table text
-) RETURNS SETOF pg_attribute.attname%TYPE AS $$
+DROP FUNCTION util__get_primary_keys(text);
+CREATE OR REPLACE FUNCTION util__get_primary_keys(text) RETURNS SETOF pg_attribute.attname%TYPE AS $$
   SELECT a.attname
     FROM pg_index i
     JOIN pg_attribute a ON a.attrelid = i.indrelid
                        AND a.attnum = ANY(i.indkey)
-  WHERE i.indrelid = p_table::regclass
+  WHERE i.indrelid = $1::regclass
     AND i.indisprimary;
 $$ LANGUAGE sql;
Index: openacs-4/packages/acs-kernel/sql/postgresql/upgrade/upgrade-5.10.0d2-5.10.0d3.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/postgresql/upgrade/upgrade-5.10.0d2-5.10.0d3.sql,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-kernel/sql/postgresql/upgrade/upgrade-5.10.0d2-5.10.0d3.sql	5 Oct 2017 09:33:46 -0000	1.1
@@ -0,0 +1,20 @@
+
+begin;
+
+-- added
+select define_function_args('util__get_primary_keys','table');
+
+--
+-- procedure util__get_primary_keys/1
+--
+DROP FUNCTION util__get_primary_keys(text);
+CREATE OR REPLACE FUNCTION util__get_primary_keys(text) RETURNS SETOF pg_attribute.attname%TYPE AS $$
+  SELECT a.attname
+    FROM pg_index i
+    JOIN pg_attribute a ON a.attrelid = i.indrelid
+                       AND a.attnum = ANY(i.indkey)
+  WHERE i.indrelid = $1::regclass
+    AND i.indisprimary;
+$$ LANGUAGE sql;
+
+end;