I've just released pgtools-20051017, another interim release of the
pgtools set of tools for agile manipulation of PostgreSQL databases.
One warning: I've changed the order of the parameters to pg-load-schema:
the namespace name now comes before the schema directory name for
consistency with other scripts and shell functions.
The main change was to bring in pg_set/reset_current_time series
of functions for testing of database code that wants to make
use of current_timestamp and friends. Basically, you just call
t_current_timestamp() instead; and the test framework can change that
to return a specific date and time. I'm currently using this only in
functional tests, since it's a shell script, but it would be nice to
figure out some way to do this in database unit tests as well.
Which leads me on to the next thing starting to emerge; pg-functions.sh
still contains things that run psql; pg-sqlgen.sh is now a home for
functions that generate SQL, which is the first step on the road to
a domain-specific language for database and schema manipulation and
As usual, I'm very interested in any and all comments people have on
these techniques in general, as well as the specific code. This stuff is
still in the, "I'm trying out different ways of doing this" stage.
Curt Sampson <cjs@...
> +81 90 7737 2974 http://www.NetBSD.org
Make up enjoying your city life...produced by BIC CAMERA