X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 47A9E5347E for ; Thu, 28 Apr 2005 23:40:30 -0300 (ADT) 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 98428-06 for ; Fri, 29 Apr 2005 02:40:20 +0000 (GMT) Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by svr1.postgresql.org (Postfix) with ESMTP id 638225337B for ; Thu, 28 Apr 2005 23:40:19 -0300 (ADT) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.3/8.13.3) with ESMTP id j3T2eImR001492 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 28 Apr 2005 20:40:21 -0600 (MDT) (envelope-from mfuhr@winnie.fuhr.org) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.3/8.13.3) with ESMTP id j3T2eIGw068230; Thu, 28 Apr 2005 20:40:18 -0600 (MDT) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.3/8.13.3/Submit) id j3T2eEdN068229; Thu, 28 Apr 2005 20:40:14 -0600 (MDT) (envelope-from mfuhr) Date: Thu, 28 Apr 2005 20:40:14 -0600 From: Michael Fuhr To: dedy Cc: pgsql-admin@postgresql.org Subject: Re: why oh why procedure Message-ID: <20050429024014.GA68161@winnie.fuhr.org> References: <20050429004807.25402.qmail@mail.unika.ac.id> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050429004807.25402.qmail@mail.unika.ac.id> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.005 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200504/399 X-Sequence-Number: 17412 On Fri, Apr 29, 2005 at 07:48:07AM +0700, dedy wrote: > > I want to create store procedure and the sql is > > CREATE PROCEDURE CARI_DATA In PostgreSQL you'll need to use CREATE FUNCTION. See also the PL/pgSQL documentation to learn its syntax and capabilities. Here are links to documentation for the latest version: http://www.postgresql.org/docs/8.0/interactive/sql-createfunction.html http://www.postgresql.org/docs/8.0/interactive/plpgsql.html -- Michael Fuhr http://www.fuhr.org/~mfuhr/