DBD-Pg
view release on metacpan or search on metacpan
quote.c - Various methods to help quote and dequote variables. Some of this is
now done on the backend, but it is still needed to support older versions
of PostgreSQL.
quote.h - Header file for quote.c
types.c - Lists all known data types for PostgreSQL.
Can be run as a perl script to check for new types; rewrites the following:
types.h types.c Pg.xs Pg.pm t/01constants.t 99_pod.t
types.h - Header file for types.c
* Test files:
dbdpg_test_postgres_versions.pl - Run the test suite against multiple versions of
Postgres, both for compilation and target. Run with "--setup head,9.4,12" etc.
to create Postgres directories in ~/pg, then run with no arguments to test all
combinations. Specify one or more compilation versions with "-c" and one or more
target versions with "-r". For example, "-c 9.4,11 -r head"
t/dbdpg_test_setup.pl - Common connection, schema creation, and schema destruction subs.
Goes through a lot of trouble to try and get a database to test with.
t/00_release.t - Quick check that all version numbers match, some other sanity checks.
t/00basic.t - Very basic test to see if DBI and DBD::Pg load properly. Requires Test::Warn
for the version warning test.
t/00_signature.t - Uses Module::Signature to verify SIGNATURE file. All tests are skipped
if the environment variable TEST_SIGNATURE is not set.
t/01connect.t - Basic connection tests, outputs pretty, detailed connection information.
t/01constants.t - Quick test of pg_types.
t/01keywords.t - Test is_keyword inside of quote.c
t/02attribs.t - Tests all attributes.
t/03dbmethod.t - Tests all database handle methods.
t/03smethod.t - Tests all statement handle methods.
t/04misc.t - Tests tracing, data_sources, $DBDPG_DEFAULT, and txn status changes.
t/06bytea.t - Tests bytea manipulation.
t/07copy.t - Tests COPY-related methods.
t/08async.t - Tests asynchronous methods.
t/09arrays.t - Tests array manipulation.
t/10_pg_error_field.t - Tests $dbh->pg_error_field function
t/12placeholders.t - Tests placeholders.
t/20savepoints.t - Test savepoints.
t/30unicode.t - Test Unicode. Or at least UTF8.
t/99cleanup.t - Removes anything we have created for the tests (e.g. tables)
t/99_lint.t - Various minor code cleanliness checks. Requires TEST_CRITIC to be set.
t/99_perlcritic.t - Uses Perl::Critic to check Pg.pm and all of the test files.
Requires that TEST_CRITIC is set. It is recommended that you get all the
Perl::Critic policies via Bundle::Perl::Critic::IncludingOptionalDependencies.
.perlcriticrc - Used by the above: we assume tests are run from the main dir.
t/99_pod.t - Verifies the POD of Pg.pm. Requires Test::POD version 0.95, and
Test::Pod::Coverage 1.04.
t/99_yaml.t - Uses Test::YAML::Meta to verify the META.yml file.
t/99_spellcheck.t - Checks the spelling of everything it can.
dbdpg_test_database - May be created by the test suite as a place to store
a new database cluster.
misc/pg9.1.24.scan.c.gz - Special pre-compiled file to help Postgres 9.1
get compiled on servers with a newer flex (all of them, at this point).
Used by dbdpg_test_postgres_versions.pl
* Helper files
The module App::Info is inside the t/lib directory (we put it there to prevent CPAN
from indexing it). It is used by Makefile.PL to determine the version of PostgreSQL
we are compiling against (by calling pg_config). It consists of:
t/lib/App/Info.pm
t/lib/App/Info/Handler.pm
t/lib/App/Info/Handler/Prompt.pm
t/lib/App/Info/Handler/Print.pm
t/lib/App/Info/RDBMS.pm
t/lib/App/Info/RDBMS/PostgreSQL.pm
t/lib/App/Info/Request.pm
t/lib/App/Info/Util.pm
===============
== Compiling ==
===============
Compiling is generally done with gcc. However, we also need to support a wide variety
of compilers. Things which may only cause a minor warning when using gcc may stop
other compilers cold. One way to catch this early is to add some warning flags to gcc.
This can be done by extending the $comp_opts string inside of the Makefile.PL file.
There are many warnings that can be enabled (see the man page for gcc for the list).
Some of these warnings trigger for things outside of our control, such as the code
for DBI or Perl itself. You can define the environment variable DBDPG_GCCDEBUG to turn
many of these options on automatically.
Within each section, the order is the same as found in man gcc.
## These are warnings that should only generate errors that we can fix:
$comp_opts .= " -Wchar-subscripts -Wcomment";
$comp_opts .= " -Wformat=2"; ## does -Wformat,-Wformat-y2k,-Wformat-nonliteral,-Wformat-security
$comp_opts .= " -Wnonnull";
( run in 0.821 second using v1.01-cache-2.11-cpan-39bf76dae61 )