Received: from cyberbiz.net.au ([202.138.13.144]) by hub.org (8.9.1/8.9.1) with SMTP id BAA08001 for ; Sun, 3 Jan 1999 01:05:04 -0500 (EST) (envelope-from gordonc@cyberbiz.net.au) Received: from localhost [202.138.13.155] by cyberbiz.net.au [202.138.13.144] with SMTP (MDaemon.v2.7.SP5k.R) for ; Sun, 03 Jan 1999 16:00:42 +1000 Date: Sun, 3 Jan 1999 16:02:35 +1000 (EST) From: Gordon Clarke X-Sender: gordonc@localhost Reply-To: Gordon Clarke To: sferac@bo.nettuno.it cc: pgsql-sql@postgresql.org Subject: Re: [SQL] Probs with int2 in functions In-Reply-To: <3688E133.CB661A68@sferacarta.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-MDaemon-Deliver-To: pgsql-sql@postgresql.org X-Return-Path: gordonc@cyberbiz.net.au On Tue, 29 Dec 1998, Jose' Soares wrote: > > The objects are successfully created, but when I come to insert data via > > the function there is the following error. > > > > zedadmin=> select insert_test2(1,'My name','My comment'); > > ERROR: function insert_test2(int4, unknown, unknown) does not exist > > > > If one changes the int2 to an int4 in the table and function, the function > > is happy to insert the data into the table. > > > > Any ideas why this is so, or is it a bug? > > > > It works on my v6.4: > > select insert_test2(1,'My name','My comment'); > insert_test2 > ------------ > 1 > (1 row) So it appear that it is a bug in 6.3.2! > Any way try to cast values as: > select insert_test2(1::int2,'My name'::varchar,'My comment'::varchar); I'd prefer not to do that. Also, since it isn't necessary for the int4 case then it shouldn't be for the int2 case and this suggests to me that it is a bug. Thanks for your suggestions and help. Cheers...Gordon ~~~~~~~~~~~~~~ 4ZzZ Brisbane's First Community FM Station ~~~~~~~~~~~~~~ The Demo Show - Supporting Australian Unsigned Artists Mon nights 6-7pm (0800-0900UTC) on 4ZzZ 102.1 FM http://www.4zzzfm.org.au/welcome.html (RA feed) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~