From: Michael Fuhr <mike@fuhr.org>
To: Enrico Weigelt <weigelt@metux.de>
Cc: pgsql-sql <pgsql-sql@postgresql.org>
Subject: Re: checking pgsql functions
Date: Wed, 20 Apr 2005 21:39:40 -0600
Message-ID: <20050421033939.GA18039@winnie.fuhr.org> (raw)
In-Reply-To: <20050421023537.GB16782@nibiru.borg.metux.de>
References: <20050421023537.GB16782@nibiru.borg.metux.de>
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/
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: mike@fuhr.org, weigelt@metux.de
Subject: Re: checking pgsql functions
In-Reply-To: <20050421033939.GA18039@winnie.fuhr.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox