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
@postgresql.org Subject: Re: [SQL] [GENERAL] Looking for information on PostgreSQL Stored Procedures 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;

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
.org; pgsql-sql@postgresql.org Subject: Re: [SQL] [GENERAL] Looking for information on PostgreSQL Stored Procedures "Foster, Stephen" <[EMAIL PROTECTED]> writes: > WHILE (--Lost on variable name for end of query; EmptyQueryResponse <> > 0? --) >

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

2005-12-11 Thread Douglas McNaught
"Foster, Stephen" <[EMAIL PROTECTED]> writes: > WHILE (--Lost on variable name for end of query; EmptyQueryResponse <> > 0? --) > BEGIN > IF LastName = fname THEN > DELETE FROM MailingList WHERE id = id; > END IF; > LastName :=

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

2005-12-11 Thread Foster, Stephen
al@postgresql.org; pgsql-sql@postgresql.org Subject: Re: [SQL] [GENERAL] Looking for information on PostgreSQL Stored Procedures On Sat, Dec 10, 2005 at 09:02:39PM -0600, Foster, Stephen wrote: > I did see last week something on PLPGSQL and read through that. But > there has to be something out the