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.12 -r1.13 --- openacs-4/packages/acs-kernel/sql/postgresql/utilities-create.sql 28 Jan 2019 21:44:12 -0000 1.12 +++ openacs-4/packages/acs-kernel/sql/postgresql/utilities-create.sql 29 Jan 2019 11:30:22 -0000 1.13 @@ -80,22 +80,23 @@ $$ LANGUAGE plpgsql; --- added -select define_function_args('util__table_column_exists','t_name,c_name'); + -- -- procedure util__table_column_exists/1 -- +select define_function_args('util__table_column_exists','p_table,p_column'); + CREATE OR REPLACE FUNCTION util__table_column_exists( - t_name text, - c_name text + p_table text, + p_column text ) RETURNS boolean AS $$ DECLARE BEGIN return exists ( select 1 from information_schema.columns c - where c.table_name = lower(t_name) - and c.column_name = lower(c_name)); + where c.table_name = lower(p_table) + and c.column_name = lower(p_column)); END; $$ LANGUAGE plpgsql; Index: openacs-4/packages/acs-kernel/sql/postgresql/upgrade/upgrade-5.10.0d10-5.10.0d11.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/postgresql/upgrade/upgrade-5.10.0d10-5.10.0d11.sql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-kernel/sql/postgresql/upgrade/upgrade-5.10.0d10-5.10.0d11.sql 29 Jan 2019 10:19:32 -0000 1.2 +++ openacs-4/packages/acs-kernel/sql/postgresql/upgrade/upgrade-5.10.0d10-5.10.0d11.sql 29 Jan 2019 11:30:22 -0000 1.3 @@ -6,16 +6,18 @@ -- -- procedure util__table_column_exists/1 -- +select define_function_args('util__table_column_exists','p_table,p_column'); + CREATE OR REPLACE FUNCTION util__table_column_exists( - c_name text, - t_name text + p_table text, + p_column text ) RETURNS boolean AS $$ DECLARE BEGIN return exists ( select 1 from information_schema.columns c - where c.table_name = lower(t_name) - and c.column_name = lower(c_name)); + where c.table_name = lower(p_table) + and c.column_name = lower(p_column)); END; $$ LANGUAGE plpgsql;