Re: function body error checking issues

Поиск
Список
Период
Сортировка
От Neil Conway
Тема Re: function body error checking issues
Дата
Msg-id 42225C1E.2030903@samurai.com
обсуждение исходный текст
Ответ на Re: function body error checking issues  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-general
Bruce Momjian wrote:
> Syntax error reporting has been improved in our code so 8.1 might be
> better and catching such errors.

Yes, current sources catches this at definition-time:

% psql -f test.sql
psql:test.sql:21: ERROR:  syntax error at or near "EXCEPTIONRATIO_OUT"
at character 1
QUERY:  EXCEPTIONRATIO_OUT = 0
CONTEXT:  SQL statement in PL/PgSQL function "get_ratio" near line 13
psql:test.sql:21: LINE 1: EXCEPTIONRATIO_OUT = 0
psql:test.sql:21:         ^

If folks have more suggestions for improving pl/pgsql compile-time error
checking, speak up. I'm also planning to implement trivially-dead-code
detection (like statements that follow a RETURN, and so on), although
that's not in HEAD yet.

-Neil

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

Предыдущее
От: Robby Russell
Дата:
Сообщение: Re: Referencing created tables fails with message that
Следующее
От: Ken Johanson
Дата:
Сообщение: Re: Possible to run the server with ANSI/ISO string escapeing