X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id DDF5B3A5655 for ; Wed, 1 Dec 2004 17:54:29 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 04630-03 for ; Wed, 1 Dec 2004 17:54:19 +0000 (GMT) Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by svr1.postgresql.org (Postfix) with ESMTP id 4B2123A5637 for ; Wed, 1 Dec 2004 17:54:18 +0000 (GMT) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.1/8.13.1) with ESMTP id iB1Hr2Yk022300 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 1 Dec 2004 10:53:04 -0700 (MST) (envelope-from mfuhr@winnie.fuhr.org) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.1/8.13.1) with ESMTP id iB1Hr18d024268; Wed, 1 Dec 2004 10:53:01 -0700 (MST) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.1/8.13.1/Submit) id iB1Hr1oc024267; Wed, 1 Dec 2004 10:53:01 -0700 (MST) (envelope-from mfuhr) Date: Wed, 1 Dec 2004 10:53:01 -0700 From: Michael Fuhr To: Andrew Thorley Cc: pgsql-sql@postgresql.org Subject: Re: inserting values into types Message-ID: <20041201175301.GA24181@winnie.fuhr.org> References: <20041201100735.1910923CE8@ws5-3.us4.outblaze.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041201100735.1910923CE8@ws5-3.us4.outblaze.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200412/4 X-Sequence-Number: 19624 On Wed, Dec 01, 2004 at 06:07:34PM +0800, Andrew Thorley wrote: > > Did you type the SQL statements and/or error messages instead > > of cutting and pasting? > > yes i C&P'ed the SQL code & error code. But did you copy the error message associated with the SQL code you copied, or did you copy some other error message? I ask because the function name in the error doesn't match the function name in the INSERT statement. Here's what I get when I execute the statements in your message: test=> CREATE TYPE qwerty_UDT AS (abc INT); CREATE TYPE test=> CREATE TABLE t (col1 qwerty_UDT); CREATE TABLE test=> INSERT INTO t (col1) Values (qwerty_UDT(123)); ERROR: function qwerty_udt(integer) does not exist You said the error you got was: ERROR: function test_x(integer) does not exist The error is the same but the detail differs: your error refers to test_x(integer) instead of qwerty_udt(integer). So where is test_x coming from? -- Michael Fuhr http://www.fuhr.org/~mfuhr/