Skip site navigation (1) Skip section navigation (2)

Re: [GENERAL] PL/pgSQL - mailng list

From: Stuart Rison <stuart(at)ludwig(dot)ucl(dot)ac(dot)uk>
To: Chris Bitmead <chris(dot)bitmead(at)bigfoot(dot)com>
Cc: pgsql-general(at)postgreSQL(dot)org
Subject: Re: [GENERAL] PL/pgSQL - mailng list
Date: 1999-05-24 15:30:56
Message-ID: v04020a0db36f1e7b3661@[] (view raw, whole thread or download thread mbox)
Lists: pgsql-general
That's an example of performing procedural tasks using Perl as the
procedural language with access to the database.

I think what Mike is looking for are examples of using PL/pgSQL.  Which, as
it where, is a procedural language 'internal' to postgreSQL (well that a
very bad way of putting it but I think you catch my drift).

Plenty of examples of using PL/pgSQL in the docs (as previously pointed
out).  I started by looking at:

and at the plpgsql.txt readme which can be found in the 'source' at:


>It's extremely straight-forward..
>$q = $dbh->prepare("SELECT x,y,z from b where c = ?");
>while (($x, $y, $z) = $q->fetchrow())) {
> #stuff
>$q = $dbh->prepare("INSERT INTO a(x,y,z) values(?,?,?);
>Mike Haberman wrote:
>> I too need more info on PL/pgSQL than the docs supply.
>> Is it possible for people to mail me any examples of PL/pgSQL.  I
>> just need to see examples of the syntax of the various control
>> sturctures, variable assignment, and the like.
>> >From simple to very complex, send anything that might be helpful.
>> thanks a ton
>> mike haberman
>> mikeh(at)ncsa(dot)uiuc(dot)edu
>> >
>> >
>Chris Bitmead

| Stuart Rison            | Ludwig Institute for Cancer Research |
+-------------------------+ 91 Riding House Street               |
| Tel. (0171) 878 4041    | London, W1P 8BT, UNITED KINGDOM.     |
| Fax. (0171) 878 4040    | stuart(at)ludwig(dot)ucl(dot)ac(dot)uk              |

In response to

pgsql-general by date

Next:From: Dustin SallingsDate: 1999-05-24 17:34:51
Subject: Re: [GENERAL] Problems with INSERT INTO?
Previous:From: Chris BitmeadDate: 1999-05-24 15:04:10
Subject: Re: [GENERAL] PL/pgSQL - mailng list

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group