Re: Program Syntax Help Needed

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Program Syntax Help Needed
Дата
Msg-id 22843.1275682576@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Program Syntax Help Needed  (Alan Simon <simon@hslc.org>)
Список pgsql-novice
Alan Simon <simon@hslc.org> writes:
> -- Import copy_note data
> CREATE OR REPLACE FUNCTION add_copy_notes() RETURNS integer AS '
> DECLARE
>     copynote RECORD;
> BEGIN;
>     FOR copynote IN SELECT * FROM asset.copy ac

One fairly common gotcha is that you can't put a semicolon directly
after BEGIN ...

> psql:generate_notes.sql:26: ERROR: syntax error at or near "RECORD"
> LINE 3: copy RECORD;
> ^

... although this error message suggests there's something else wrong in
the immediate vicinity.  But since what that shows doesn't match up with
what you show above, I wonder whether you're confusing yourself by
editing the wrong file.  We've all done it :-(

            regards, tom lane

В списке pgsql-novice по дате отправления:

Предыдущее
От: Alan Simon
Дата:
Сообщение: Program Syntax Help Needed
Следующее
От: Leif Biberg Kristensen
Дата:
Сообщение: Re: Program Syntax Help Needed