On 08/20/2014 07:00 AM, Lori Corbani wrote:
My example: DROP FUNCTION ACC_setMax(); CREATE OR REPLACE FUNCTION ACC_setMax ( increment int, prefixPart varchar(30) = 'MGI:' ) RETURNS VOID AS \$\$ BEGIN /* Increment the max MGI Accession Number by @increment */ update ACC_AccessionMax set maxNumericPart = maxNumericPart + increment where prefixPart = prefixPart ; END; \$\$ LANGUAGE plpgsql; GRANT EXECUTE ON FUNCTION ACC_setMax(int,varchar) TO public; ***** When I change the parameter "prefixPart" to "v_prefixPart"....I get the error. prefixPart varchar(30) = 'MGI:' where prefixPart = prefixPart changed to v_ prefixPart varchar(30) = 'MGI:' where prefixPart = v_prefixPart
It worked here on Postgres 9.3 and un-escaping the $. -- Adrian Klaver adrian.klaver@xxxxxxxxxxx -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general