X-Original-To: pgsql-general@postgresql.org Received: from localhost (developer.postgresql.org [64.117.224.193]) by developer.postgresql.org (Postfix) with ESMTP id 6B0159231E4; Fri, 30 May 2003 11:04:11 -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 15480-04; Fri, 30 May 2003 11:04:09 -0400 (EDT) Received: from mail1.ihs.com (mail1.ihs.com [170.207.70.222]) by developer.postgresql.org (Postfix) with ESMTP id 81835921C08; Fri, 30 May 2003 11:04:09 -0400 (EDT) Received: from css120.ihs.com (css120.ihs.com [170.207.105.120]) by mail1.ihs.com (8.12.9/8.12.9) with ESMTP id h4UF3QQB024823; Fri, 30 May 2003 09:03:26 -0600 (MDT) Date: Fri, 30 May 2003 08:47:27 -0600 (MDT) From: "scott.marlowe" To: utomo restu Cc: , Subject: Re: [PHP] help ? In-Reply-To: <20030530050017.15862.qmail@linuxmail.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-MailScanner: Found to be clean X-MailScanner-SpamCheck: X-Virus-Scanned: by amavisd-new X-Archive-Number: 200305/1237 X-Sequence-Number: 42891 The PHP list is probably sub-optimal, so I'm cross posting this to general. Whoever gets it next there, please remove the PHP cc then. On Fri, 30 May 2003, utomo restu wrote: > Dear All > > I'am a new user in postgresql, i want to ask about : > > 1. The one who is intended with STORED PROCEDURE, > how its implement and what its surplus. > Version POSTGRESQL that how much possess STRORED PROCEDURE. Every version I've ever used. If you are running anything older than 7.2.4 you should upgrade. 7.3.3 is the latest stable release, and it is quite stable and very fast. > 2. In when I make the function as follows: > > CREATE FUNCTION forward(CHAR(10)) > RETURNS CHAR(10), CHAR(30) > AS 'select no_id, name FROM address where no_id=$1;' > Language 'sql'; > > To step forward orders the error ... > Which wants I asked, how make a function that can step forward > RETURNS More than a column > (I want to show 2 columns i.e. no_id and Name) ? You're going to need 7.3.x to do this, so you may as well upgrade to it now. Record sets can be returned as of version 7.3. For more information on record sets in stored procedures, see the programmer's guide: http://www.postgresql.org/docs/view.php?version=7.3&idoc=0&file=programmer.html Sepcifically the section on returning rows in plpgsql: http://www.postgresql.org/docs/view.php?version=7.3&idoc=0&file=plpgsql-control-structures.html#PLPGSQL-STATEMENTS-RETURNING Happy hacking!