Re: [SQL] [GENERAL] Looking for information on PostgreSQL Stored Procedures

2005-12-11 Thread Tom Lane
"Foster, Stephen" <[EMAIL PROTECTED]> writes: > WHILE (--Lost on variable name for end of query; > EmptyQueryResponse <> 0? --) WHILE FOUND LOOP ... END LOOP Although as Michael mentioned, this is all the hard way; any experienced plpgsql programmer w

Re: [SQL] [GENERAL] Looking for information on PostgreSQL Stored Procedures

2005-12-11 Thread Foster, Stephen
Thanks Michael! Guess I should have drunk more coffee before replying. I must have miss that. -Original Message- From: Michael Fuhr [mailto:[EMAIL PROTECTED] Sent: Sunday, December 11, 2005 11:22 AM To: Douglas McNaught Cc: Foster, Stephen; pgsql-general@postgresql.org; pgsql-sql@postgre

Re: [SQL] [GENERAL] Looking for information on PostgreSQL Stored Procedures

2005-12-11 Thread Foster, Stephen
Trying a totally different approach. Simple procedure that I'm using to use as learn opportunity in stored procedures in PostgreSQL prior to migrating a complex web site. Call it a training example if you will. Goal is to learn the correct process of working with cursors on complex queries in Pos

Re: [SQL] [GENERAL] Looking for information on PostgreSQL Stored Procedures

2005-12-11 Thread Michael Fuhr
On Sun, Dec 11, 2005 at 11:38:47AM -0500, Douglas McNaught wrote: > "Foster, Stephen" <[EMAIL PROTECTED]> writes: > > > WHILE (--Lost on variable name for end of query; EmptyQueryResponse <> > > 0? --) > > BEGIN > > IF LastName = fname THEN > > DELETE FROM Maili

Re: [SQL] [GENERAL] Looking for information on PostgreSQL Stored Procedures

2005-12-11 Thread Tom Lane
"Foster, Stephen" <[EMAIL PROTECTED]> writes: > This is one of the simple ones that has me hung up. It currently errors > out on the first line. Why I have no idea. It looks right to me. You should show us the error message; most of us are not psychics. > CREATE FUNCTION sp_removedups() RETURN

Re: [SQL] [GENERAL] Looking for information on PostgreSQL Stored Procedures

2005-12-11 Thread Foster, Stephen
Ok, I tried it in that I'm still getting errors. Happy to do so but well is my errors? -Original Message- From: Douglas McNaught [mailto:[EMAIL PROTECTED] Sent: Sunday, December 11, 2005 10:39 AM To: Foster, Stephen Cc: 'Michael Fuhr'; pgsql-general@postgresql.org; pgsql-sql@postgresql.o

Re: [SQL] [GENERAL] Looking for information on PostgreSQL Stored Procedures

2005-12-11 Thread Foster, Stephen
Michael, This is one of the simple ones that has me hung up. It currently errors out on the first line. Why I have no idea. It looks right to me. One of the harder ones that I have to work on is on the security sub-routines to pull together the security rights for a person during login and I'm