Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 0F5DA9FBA63 for ; Wed, 4 Apr 2007 02:09:51 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 21666-06-2 for ; Wed, 4 Apr 2007 02:09:32 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.183]) by postgresql.org (Postfix) with ESMTP id BFE039FBA89 for ; Wed, 4 Apr 2007 02:01:18 -0300 (ADT) Received: from [194.25.154.138] (helo=webserv.wug.de) by mrelayeu.kundenserver.de (node=mrelayeu8) with ESMTP (Nemesis), id 0ML31I-1HYxcT0z6A-0005xM; Wed, 04 Apr 2007 07:01:17 +0200 Received: from kretschmer by webserv.wug.de with local (Exim 3.36 #1) id 1HYxcS-0007BJ-00 for pgsql-sql@postgresql.org; Wed, 04 Apr 2007 07:01:16 +0200 Date: Wed, 4 Apr 2007 07:01:16 +0200 From: "A. Kretschmer" To: pgsql-sql@postgresql.org Subject: Re: plpgsql function question Message-ID: <20070404050116.GA27391@a-kretschmer.de> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-OS: Debian/GNU Linux - weil ich es mir Wert bin! X-Message-Flag: "Windows" is not the answer. "Windows" is the question and the answer is "no"! User-Agent: Mutt/1.5.9i X-Provags-ID: V01U2FsdGVkX1+qi3x3Bl+faUZulEO3EPqNnZclz4gQBebG1uy 4GXzCzpmPi9hZrD2nzOcozZUPVfXZXorczcZffbSm1OALbnxKB MhlMSSZJXtMq61Gk1p8SNsaVDvgnvO5 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200704/48 X-Sequence-Number: 28048 am Tue, dem 03.04.2007, um 13:19:26 -0700 mailte Karthikeyan Sundaram folgendes: > Thank you very much. It works. I am not doing any insert or update hence I > cannot create a trigger. But my another question is > > How will I pass the values to Foo parameters. > > I mean > > I want to pass > i = 1 > j = 'God' > K = now() > > which all the three will be used to check in the function > should I say > > select a_func(1,'good',now()); Because your function expects one parameter of your new type, you have to CAST your data into this type: test=# select * from my_a((1, 'foo', current_date)::a); my_a ------ 1 (1 row) [ dumb fullquote deleted ] Andreas -- Andreas Kretschmer Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header) GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net