Re: [PHP] help ?

From: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
To: utomo restu <utomo(at)linuxmail(dot)org>
Cc: <pgsql-php(at)postgresql(dot)org>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: [PHP] help ?
Date: 2003-05-30 14:47:27
Message-ID: Pine.LNX.4.33.0305300839420.31323-100000@css120.ihs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-php


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!

In response to

  • help ? at 2003-05-30 05:00:17 from utomo restu

Browse pgsql-general by date

  From Date Subject
Next Message Nailah Ogeer 2003-05-30 15:07:41 Elog
Previous Message Jeff Eckermann 2003-05-30 13:58:53 Re: How to query multiple dbases efficiently?

Browse pgsql-php by date

  From Date Subject
Next Message Bruce Young 2003-05-30 23:41:43 DESIGN CONCEPT (performance) - switch/arrays/forms
Previous Message utomo restu 2003-05-30 05:00:17 help ?