Thread: PL/pgSQL - mailng list
I'd like to get to know where should I post messages concerning PL/pgSQL. /--------------------------------------------------------/ /- Piotr Stelmaszyk |---- Student of Computer Science ---/ /------------------ | at Poznan University of Technology / /----- mailto:kelman@fanthom.math.put.poznan.pl ---------/ /----- mailto:kelman@alpha.net.pl -----------------------/ /--------------------------------------------------------/
I'd just plain would like to know more about PL/pgSQL. Andy On Sat, 22 May 1999, Piotr Stelmaszyk wrote: > I'd like to get to know where should I post messages concerning > PL/pgSQL. > > > /--------------------------------------------------------/ > /- Piotr Stelmaszyk |---- Student of Computer Science ---/ > /------------------ | at Poznan University of Technology / > /----- mailto:kelman@fanthom.math.put.poznan.pl ---------/ > /----- mailto:kelman@alpha.net.pl -----------------------/ > /--------------------------------------------------------/ > > >
On Sat, 22 May 1999, Andy Lewis wrote: How can we tell you more if we don't know what you know? It's usually pretty safe to just go ahead and ask the question. You'll be redirected if you've posted to the wrong place. // I'd just plain would like to know more about PL/pgSQL. // // Andy // // On Sat, 22 May 1999, Piotr Stelmaszyk wrote: // // > I'd like to get to know where should I post messages concerning // > PL/pgSQL. // > // > // > /--------------------------------------------------------/ // > /- Piotr Stelmaszyk |---- Student of Computer Science ---/ // > /------------------ | at Poznan University of Technology / // > /----- mailto:kelman@fanthom.math.put.poznan.pl ---------/ // > /----- mailto:kelman@alpha.net.pl -----------------------/ // > /--------------------------------------------------------/ // > // > // > // // // -- Principal Member Technical Staff, beyond.com The world is watching America, pub 1024/3CAE01D5 1994/11/03 Dustin Sallings <dustin@spy.net> | Key fingerprint = 87 02 57 08 02 D0 DA D6 C8 0F 3E 65 51 98 D8 BE L______________________________________________ and America is watching TV. __
The only thing that I know is whats in the docs and whats in the src directory. I'd like to see/read more. I was going to pick up a Oracle book on it but, I'm afraid that PL/pgSQL and PL/SQL aren't the same. Thanks Andy On Sat, 22 May 1999, dustin sallings wrote: > On Sat, 22 May 1999, Andy Lewis wrote: > > How can we tell you more if we don't know what you know? It's > usually pretty safe to just go ahead and ask the question. You'll be > redirected if you've posted to the wrong place. > > // I'd just plain would like to know more about PL/pgSQL. > // > // Andy > // > // On Sat, 22 May 1999, Piotr Stelmaszyk wrote: > // > // > I'd like to get to know where should I post messages concerning > // > PL/pgSQL. > // > > // > > // > /--------------------------------------------------------/ > // > /- Piotr Stelmaszyk |---- Student of Computer Science ---/ > // > /------------------ | at Poznan University of Technology / > // > /----- mailto:kelman@fanthom.math.put.poznan.pl ---------/ > // > /----- mailto:kelman@alpha.net.pl -----------------------/ > // > /--------------------------------------------------------/ > // > > // > > // > > // > // > // > > -- > Principal Member Technical Staff, beyond.com The world is watching America, > pub 1024/3CAE01D5 1994/11/03 Dustin Sallings <dustin@spy.net> > | Key fingerprint = 87 02 57 08 02 D0 DA D6 C8 0F 3E 65 51 98 D8 BE > L______________________________________________ and America is watching TV. __ >
On Sat, 22 May 1999, Andy Lewis wrote: It only took me about three clicks off of the home page to get this: http://postgresql.nextpath.com/docs/programmer/xplang.htm which does a pretty good job of describing it. I thought it did a good enough job at describing the installation and the language. Enough for me to get it going, anyway. I'm not sure how you could read anything more than the documentation (I mean, anything more should also be documentation). Have you tried it at all yet? Do you have any specific questions? Are there any things you're trying to do with it that you haven't been able to imagine or figure out yet? // The only thing that I know is whats in the docs and whats in the src // directory. I'd like to see/read more. I was going to pick up a Oracle book // on it but, I'm afraid that PL/pgSQL and PL/SQL aren't the same. // // Thanks // // Andy // // On Sat, 22 May 1999, dustin sallings wrote: // // > On Sat, 22 May 1999, Andy Lewis wrote: // > // > How can we tell you more if we don't know what you know? It's // > usually pretty safe to just go ahead and ask the question. You'll be // > redirected if you've posted to the wrong place. // > // > // I'd just plain would like to know more about PL/pgSQL. // > // // > // Andy // > // // > // On Sat, 22 May 1999, Piotr Stelmaszyk wrote: // > // // > // > I'd like to get to know where should I post messages concerning // > // > PL/pgSQL. // > // > // > // > // > // > /--------------------------------------------------------/ // > // > /- Piotr Stelmaszyk |---- Student of Computer Science ---/ // > // > /------------------ | at Poznan University of Technology / // > // > /----- mailto:kelman@fanthom.math.put.poznan.pl ---------/ // > // > /----- mailto:kelman@alpha.net.pl -----------------------/ // > // > /--------------------------------------------------------/ // > // > // > // > // > // > // > // // > // // > // // > // > -- // > Principal Member Technical Staff, beyond.com The world is watching America, // > pub 1024/3CAE01D5 1994/11/03 Dustin Sallings <dustin@spy.net> // > | Key fingerprint = 87 02 57 08 02 D0 DA D6 C8 0F 3E 65 51 98 D8 BE // > L______________________________________________ and America is watching TV. __ // > // // // -- Principal Member Technical Staff, beyond.com The world is watching America, pub 1024/3CAE01D5 1994/11/03 Dustin Sallings <dustin@spy.net> | Key fingerprint = 87 02 57 08 02 D0 DA D6 C8 0F 3E 65 51 98 D8 BE L______________________________________________ and America is watching TV. __
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@ncsa.uiuc.edu > > On Sat, 22 May 1999, Andy Lewis wrote: > > How can we tell you more if we don't know what you know? It's > usually pretty safe to just go ahead and ask the question. You'll be > redirected if you've posted to the wrong place. > > // I'd just plain would like to know more about PL/pgSQL. > // > // Andy > // > // On Sat, 22 May 1999, Piotr Stelmaszyk wrote: > // > // > I'd like to get to know where should I post messages concerning > // > PL/pgSQL. > // > > // > > // > /--------------------------------------------------------/ > // > /- Piotr Stelmaszyk |---- Student of Computer Science ---/ > // > /------------------ | at Poznan University of Technology / > // > /----- mailto:kelman@fanthom.math.put.poznan.pl ---------/ > // > /----- mailto:kelman@alpha.net.pl -----------------------/ > // > /--------------------------------------------------------/ > // > > // > > // > > // > // > // > > -- > Principal Member Technical Staff, beyond.com The world is watching America, > pub 1024/3CAE01D5 1994/11/03 Dustin Sallings <dustin@spy.net> > | Key fingerprint = 87 02 57 08 02 D0 DA D6 C8 0F 3E 65 51 98 D8 BE > L______________________________________________ and America is watching TV. __ > >
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@ncsa.uiuc.edu > > > > > On Sat, 22 May 1999, Andy Lewis wrote: > > > > How can we tell you more if we don't know what you know? It's > > usually pretty safe to just go ahead and ask the question. You'll be > > redirected if you've posted to the wrong place. > > > > // I'd just plain would like to know more about PL/pgSQL. > > // > > // Andy > > // > > // On Sat, 22 May 1999, Piotr Stelmaszyk wrote: > > // > > // > I'd like to get to know where should I post messages concerning > > // > PL/pgSQL. > > // > > > // > > > // > /--------------------------------------------------------/ > > // > /- Piotr Stelmaszyk |---- Student of Computer Science ---/ > > // > /------------------ | at Poznan University of Technology / > > // > /----- mailto:kelman@fanthom.math.put.poznan.pl ---------/ > > // > /----- mailto:kelman@alpha.net.pl -----------------------/ > > // > /--------------------------------------------------------/ > > // > > > // > > > // > > > // > > // > > // > > > > -- > > Principal Member Technical Staff, beyond.com The world is watching America, > > pub 1024/3CAE01D5 1994/11/03 Dustin Sallings <dustin@spy.net> > > | Key fingerprint = 87 02 57 08 02 D0 DA D6 C8 0F 3E 65 51 98 D8 BE > > L______________________________________________ and America is watching TV. __ > > > > -- Chris Bitmead http://www.bigfoot.com/~chris.bitmead mailto:chris.bitmead@bigfoot.com
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@ncsa.uiuc.edu >> >> > <snip> >> > > >-- >Chris Bitmead >http://www.bigfoot.com/~chris.bitmead >mailto:chris.bitmead@bigfoot.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@ludwig.ucl.ac.uk | +-------------------------+--------------------------------------+
On Tue, 25 May 1999, Chris Bitmead wrote: What does this have to do with pl/pgsql? # 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@ncsa.uiuc.edu # > # > > # > > On Sat, 22 May 1999, Andy Lewis wrote: # > > # > > How can we tell you more if we don't know what you know? It's # > > usually pretty safe to just go ahead and ask the question. You'll be # > > redirected if you've posted to the wrong place. # > > # > > // I'd just plain would like to know more about PL/pgSQL. # > > // # > > // Andy # > > // # > > // On Sat, 22 May 1999, Piotr Stelmaszyk wrote: # > > // # > > // > I'd like to get to know where should I post messages concerning # > > // > PL/pgSQL. # > > // > # > > // > # > > // > /--------------------------------------------------------/ # > > // > /- Piotr Stelmaszyk |---- Student of Computer Science ---/ # > > // > /------------------ | at Poznan University of Technology / # > > // > /----- mailto:kelman@fanthom.math.put.poznan.pl ---------/ # > > // > /----- mailto:kelman@alpha.net.pl -----------------------/ # > > // > /--------------------------------------------------------/ # > > // > # > > // > # > > // > # > > // # > > // # > > // # > > # > > -- # > > Principal Member Technical Staff, beyond.com The world is watching America, # > > pub 1024/3CAE01D5 1994/11/03 Dustin Sallings <dustin@spy.net> # > > | Key fingerprint = 87 02 57 08 02 D0 DA D6 C8 0F 3E 65 51 98 D8 BE # > > L______________________________________________ and America is watching TV. __ # > > # > > # # -- # Chris Bitmead # http://www.bigfoot.com/~chris.bitmead # mailto:chris.bitmead@bigfoot.com # # -- SA, beyond.com My girlfriend asked me which one I like better. pub 1024/3CAE01D5 1994/11/03 Dustin Sallings <dustin@spy.net> | Key fingerprint = 87 02 57 08 02 D0 DA D6 C8 0F 3E 65 51 98 D8 BE L_______________________ I hope the answer won't upset her. ____________