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@[128.40.242.190] |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
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:
http://www.postgresql.org/docs/programmer/xplang1290.htm
and at the plpgsql.txt readme which can be found in the 'source' at:
<source_directory>/src/pl/plpgsql/doc
Stuart.
>It's extremely straight-forward..
>$q = $dbh->prepare("SELECT x,y,z from b where c = ?");
>$q->execute("foo");
>while (($x, $y, $z) = $q->fetchrow())) {
> #stuff
>}
>
>$q = $dbh->prepare("INSERT INTO a(x,y,z) values(?,?,?);
>$q->execute($x,$y,$z);
>
>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
>>
>> >
<snip>
>> >
>
>--
>Chris Bitmead
>http://www.bigfoot.com/~chris.bitmead
>mailto:chris(dot)bitmead(at)bigfoot(dot)com
+-------------------------+--------------------------------------+
| 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 |
+-------------------------+--------------------------------------+
From | Date | Subject | |
---|---|---|---|
Next Message | Dustin Sallings | 1999-05-24 17:34:51 | Re: [GENERAL] Problems with INSERT INTO? |
Previous Message | Chris Bitmead | 1999-05-24 15:04:10 | Re: [GENERAL] PL/pgSQL - mailng list |