Re: [SQL] Looking for information on PostgreSQL Stored Procedures
| От | Tom Lane |
|---|---|
| Тема | Re: [SQL] Looking for information on PostgreSQL Stored Procedures |
| Дата | |
| Msg-id | 17301.1134320658@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: [SQL] Looking for information on PostgreSQL Stored Procedures ("Foster, Stephen" <stephenlfoster@comcast.net>) |
| Ответы |
Re: [SQL] Looking for information on PostgreSQL Stored Procedures
|
| Список | pgsql-general |
"Foster, Stephen" <stephenlfoster@comcast.net> 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() RETURNS void AS
> $BODY$
> DECLARE lastname varchar(255);
> fname varchar(255);
> id bigint;
> DECLARE NewListCursor CURSOR FOR
> SELECT Name, id
> FROM MailingList
> ORDER BY Name;
> OPEN NewListCursor;
You're missing a BEGIN, and I'm not sure whether it's allowed to use the
DECLARE keyword twice in the same block (the second instance is certainly
unnecessary even if legal).
regards, tom lane
В списке pgsql-general по дате отправления: