X-Original-To: pgsql-admin@postgresql.org Received: from localhost (unknown [64.117.224.193]) by developer.postgresql.org (Postfix) with ESMTP id EE7FD925F02 for ; Mon, 19 May 2003 18:29:06 -0400 (EDT) Received: from developer.postgresql.org ([64.117.224.193]) by localhost (developer.postgresql.org [64.117.224.193:10024]) (amavisd-new) with ESMTP id 43507-07 for ; Mon, 19 May 2003 18:29:02 -0400 (EDT) Received: from news.hub.org (unknown [64.117.225.234]) by developer.postgresql.org (Postfix) with ESMTP id C1CE3925722 for ; Mon, 19 May 2003 08:41:57 -0400 (EDT) Received: by news.hub.org (Postfix, from userid 8) id 540B22534AA; Mon, 19 May 2003 08:41:53 -0400 (EDT) From: kevin@mtel.co.uk (kevin) X-Newsgroups: comp.databases.postgresql.admin Subject: user defined function call problem after upgrade 7.2.3 -> 7.3.2 Date: 19 May 2003 05:41:39 -0700 Organization: http://groups.google.com/ Lines: 66 Message-ID: <6675f17.0305190441.1c9a559d@posting.google.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Complaints-To: groups-abuse@google.com To: pgsql-admin@postgresql.org X-Virus-Scanned: by amavisd-new X-Archive-Number: 200305/285 X-Sequence-Number: 8847 hi, iv'e recently upgraded and all seemed fine with our app until a user defined function was called today and we get the folowing error logged on out web server. SELECT updateordhdr(' 5',01,'2003-05-20','O 5 12003-05-20','','','','','','',00,'O','O',00) Gave: java.sql.SQLException: ERROR: Function updateordhdr("unknown", integer, "unknown", "unknown", "unknown", "unknown", "unknown", "unknown", "unknown", "unknown", integer, "unknown", "unknown", integer) does not exist Unable to identify a function that satisfies the given argument types You may need to add explicit typecasts I've extracted the def from the db using pg_dump. I did not notice any error messages while loading the functions (as part of a restore). Is it complaining abouty the strings? I thought character and char varying didn't need casting, and they certainly didn't before. Any ideas? -- -- TOC entry 152 (OID 196117) -- Name: updateordhdr (character varying, smallint, date, character, character varying, character varying, character varying, character varying, character varying, character varying, smallint, character, character, integer); Type: FUNCTION; Schema: public; Owner: root -- CREATE FUNCTION updateordhdr (character varying, smallint, date, character, character varying, character varying, character varying, character varying, character varying, character varying, smallint, character, character, integer) RETURNS integer AS ' DECLARE myaccount ALIAS FOR $1; mydelivery ALIAS FOR $2; mythedate ALIAS FOR $3; mytheorder ALIAS FOR $4; mydeliverynote ALIAS FOR $5; myinvoicenote ALIAS FOR $6; mygrnpod ALIAS FOR $7; mycomments ALIAS FOR $8; mydcomments ALIAS FOR $9; myround ALIAS FOR $10; mytempno ALIAS FOR $11; mystatus ALIAS FOR $12; myordertype ALIAS FOR $13; mytransno ALIAS FOR $14; mycount int4; BEGIN SELECT COUNT(*) INTO mycount FROM orderheader WHERE theorder=mytheorder; IF mycount=0 THEN INSERT INTO orderheader (account,delivery,thedate,theorder,deliverynote,invoicenote,grnpod,comments,dcomments,round,tempno,status,ordertype,transno) VALUES (myaccount,mydelivery,mythedate,mytheorder,mydeliverynote,myinvoicenote,mygrnpod,mycomments,mydcomments,myround,mytempno,mystatus,myordertype,mytransno); ELSE UPDATE orderheader SET account=myaccount,delivery=mydelivery,thedate=mythedate,theorder=mytheorder,deliverynote=mydeliverynote,invoicenote=myinvoicenote,grnpod=mygrnpod,comments=mycomments,dcomments=mydcomments,round=myround,tempno=mytempno,status=mystatus,ordertype=myordertype,transno=mytransno WHERE theorder=mytheorder; END IF; RETURN mycount; END; ' LANGUAGE plpgsql; -- -- TOC entry 153 (OID 196117) -- Name: updateordhdr (character varying, smallint, date, character, character varying, character varying, character varying, character varying, character varying, character varying, smallint, character, character, integer); Type: ACL; Schema: public; Owner: root -- REVOKE ALL ON FUNCTION updateordhdr (character varying, smallint, date, character, character varying, character varying, character varying, character varying, character varying, character varying, smallint, character, character, integer) FROM PUBLIC; GRANT ALL ON FUNCTION updateordhdr (character varying, smallint, date, character, character varying, character varying, character varying, character varying, character varying, character varying, smallint, character, character, integer) TO PUBLIC;