Re: checking pgsql functions

Поиск
Список
Период
Сортировка
Искать
От
Michael Fuhr
Тема
Re: checking pgsql functions
Дата
Msg-id
20050421033939.GA18039@winnie.fuhr.org
Ответ на
checking pgsql functions (Enrico Weigelt)
Список
Дерево обсуждения
checking pgsql functions Enrico Weigelt <weigelt@metux.de>
Re: checking pgsql functions Tom Lane <tgl@sss.pgh.pa.us>
Re: checking pgsql functions Michael Fuhr <mike@fuhr.org>
On Thu, Apr 21, 2005 at 04:35:37AM +0200, Enrico Weigelt wrote:
> 
> Is it possible to check plpgsql functions before they're actually
> into the database, as it's done w/ sql functions ?

What version of PostgreSQL are you using?  8.0 and later have a
validator function for PL/pgSQL, although its syntax checks are
minimal and errors can still get through.  I'm sure a patch that
improves it would be welcome :-)

> Often I've got the problem that a function still contains some
> syntax errors (well, nobody's perfect), but my application is 
> quite critical (a single crashing trigger may cost a lot of money).
> So I'd like to checkin only syntactically correct (also with 
> correct references).

Since the application is critical, hopefully you're running regression
tests in a non-production environment before modifying the production
system.  Is that not the case?  Regardless of how much syntax checking
the DBMS does, it would still be prudent to test as many code paths as
possible for semantic correctness.

-- 
Michael Fuhr
http://www.fuhr.org/~mfuhr/

В списке pgsql-sql по дате отправления
От: Tom Lane
Дата:
Сообщение: Re: checking pgsql functions
От: KÖPFERL Robert
Дата:
FAQ