Author: turnstep
Date: Sat Jul 12 20:25:21 2008
New Revision: 11526
Modified:
DBD-Pg/trunk/Changes
DBD-Pg/trunk/META.yml
DBD-Pg/trunk/Makefile.PL
DBD-Pg/trunk/Pg.pm
DBD-Pg/trunk/README
DBD-Pg/trunk/dbdimp.c
DBD-Pg/trunk/lib/Bundle/DBD/Pg.pm
Log:
Bump version to 2.8.5, improve the docs a bit.
Modified: DBD-Pg/trunk/Changes
==============================================================================
--- DBD-Pg/trunk/Changes (original)
+++ DBD-Pg/trunk/Changes Sat Jul 12 20:25:21 2008
@@ -6,6 +6,7 @@
is set to DEBUG3 or greater, and we then exit without
disconnecting
while AutoCommit is off. The new behavior is to simply not
attempt to
output the debugging information about the final 'rollback'.
[GSM]
+ - More documentation improvements.
2.8.4 Released July 10, 2008 (subversion r11520)
Modified: DBD-Pg/trunk/META.yml
==============================================================================
--- DBD-Pg/trunk/META.yml (original)
+++ DBD-Pg/trunk/META.yml Sat Jul 12 20:25:21 2008
@@ -1,6 +1,6 @@
--- #YAML:1.0
name : DBD-Pg
-version : 2.8.4
+version : 2.8.5
abstract : DBI PostgreSQL interface
author:
- Greg Sabino Mullane <[EMAIL PROTECTED]>
@@ -38,10 +38,10 @@
provides:
DBD::Pg:
file : Pg.pm
- version : 2.8.4
+ version : 2.8.5
Bundle::DBD::Pg:
file : lib/Bundle/DBD/Pg.pm
- version : 2.8.4
+ version : 2.8.5
keywords:
- Postgres
Modified: DBD-Pg/trunk/Makefile.PL
==============================================================================
--- DBD-Pg/trunk/Makefile.PL (original)
+++ DBD-Pg/trunk/Makefile.PL Sat Jul 12 20:25:21 2008
@@ -7,7 +7,7 @@
use 5.006001;
## No version.pm for this one, as the prereqs are not loaded yet.
-my $VERSION = '2.8.4';
+my $VERSION = '2.8.5';
my $lib;
BEGIN {
Modified: DBD-Pg/trunk/Pg.pm
==============================================================================
--- DBD-Pg/trunk/Pg.pm (original)
+++ DBD-Pg/trunk/Pg.pm Sat Jul 12 20:25:21 2008
@@ -17,7 +17,7 @@
{
package DBD::Pg;
- use version; our $VERSION = qv('2.8.4');
+ use version; our $VERSION = qv('2.8.5');
use DBI ();
use DynaLoader ();
@@ -1694,7 +1694,7 @@
=head1 VERSION
-This documents version 2.8.4 of the DBD::Pg module
+This documents version 2.8.5 of the DBD::Pg module
=head1 DESCRIPTION
@@ -2121,8 +2121,8 @@
=item B<Warn> (boolean, inherited)
-Enables warnings. This is on by default, and should only be turned off in a
local block for a short a time
-as is absolutely needed.
+Enables warnings. This is on by default, and should only be turned off in a
local block
+for a short a time only when absolutely needed.
=item B<Active> (boolean, read-only)
@@ -2556,28 +2556,57 @@
=item B<commit>
- $rc = $dbh->commit;
+ $rc = $dbh->commit;
-Supported by this driver as proposed by DBI. See also the notes about
-B<Transactions> elsewhere in this document.
+Issues a COMMIT to the server, indicating that the current transaction is
finished and that
+all changes made will be visible to other processes. If AutoCommit is enabled,
then
+a warning is given and no COMMIT is issued. Returns true on success, false on
error.
+See also the the section on L</Transactions>.
=item B<rollback>
- $rc = $dbh->rollback;
+ $rc = $dbh->rollback;
-Supported by this driver as proposed by DBI. See also the notes about
-B<Transactions> elsewhere in this document.
+Issues a ROLLBACK to the server, which discards any changes made in the
current transaction. If AutoCommit
+is enabled, then a warning is given and no ROLLBACK is issued. Returns true on
success, and
+false on error. See also the the section on L</Transactions>.
=item B<begin_work>
-Supported by this driver as proposed by DBI. Note that this will not
-issue a "begin" until immediately before the next given command.
+This method turns on transactions until the next call to C<commit> or
C<rollback>, if AutoCommit is
+currently enabled. If it is not enabled, calling begin_work will issue an
error. Note that the
+transaction will not actually begin until the first statement after begin_work
is called.
+Example:
+
+ $dbh->{AutoCommit} = 1;
+ $dbh->do("INSERT INTO foo VALUES (123)"); ## Changes committed immediately
+ $dbh->begin_work();
+ ## Not in a transaction yet, but AutoCommit is set to 0
+
+ $dbh->do("INSERT INTO foo VALUES (345)");
+ ## DBD::PG actually issues two statements here:
+ ## BEGIN;
+ ## INSERT INTO foo VALUES (345)
+ ## We are now in a transaction
+
+ $dbh->commit();
+ ## AutoCommit is now set to 1 again
=item B<disconnect>
$rc = $dbh->disconnect;
-Supported by this driver as proposed by DBI.
+Disconnects from the Postgres database. Any uncommitted changes will be rolled
back upon disconnection. It's
+good policy to always explicitly call commit or rollback at some point before
disconnecting, rather than
+relying on the default rollback behavior.
+
+This method may give warnings about "disconnect invalidates X active statement
handle(s)". This means that
+you called $sth->execute() but did not finish fetching all the rows from them.
To avoid seeing this
+warning, either fetch all the rows or call $sth->finish() for each executed
statement handle.
+
+If the script exits before disconnect is called (or, more precisely, if the
database handle is no longer
+referenced by anything), then the database handle' DESTROY method will call
the rollback() and disconnect()
+methods automatically. It is best to explicitly disconnect rather than rely on
this behavior.
=item pg_notifies
@@ -2840,7 +2869,20 @@
=item B<quote_identifier>
-Implemented by DBI, no driver-specific impact.
+ $string = $dbh->quote_identifier( $name );
+ $string = $dbh->quote_identifier( $catalog, $schema, $table);
+
+Returns a quoted version of the supplied string, which is commonly a schema,
+table, or column name. The three argument form will return the schema and
+the table together, separated by a dot (the $catalog argument is ignored).
+Examples:
+
+ print $dbh->quote_identifier('grapefruit'); ## Prints: "grapefruit"
+
+ print $dbh->quote_identifier('juicy fruit'); ## Prints: "juicy fruit"
+
+ print $dbh->quote_identifier(undef, 'public', 'pg_proc');
+ ## Prints: "public"."pg_proc"
=item B<pg_server_trace>
@@ -3286,9 +3328,6 @@
object identifier. The offset and len parameters may be set to zero, in which
case the driver fetches the whole blob at once.
-Starting with PostgreSQL 6.5, every access to a blob has to be put into a
-transaction. This holds even for a read-only access.
-
See also the PostgreSQL-specific functions concerning blobs, which are
available via the C<func> interface.
@@ -3340,14 +3379,15 @@
=item B<PRECISION> (arrayref, read-only)
-Supported by this driver. C<NUMERIC> types will return the precision. Types of
-C<CHAR> and C<VARCHAR> will return their size (number of characters). Other
-types will return the number of I<bytes>.
+Returns a reference to an array of integer values of each column.
+C<NUMERIC> types will return the precision. Types of C<CHAR> and C<VARCHAR>
+will return their size (number of characters). Other types will return the
number
+of I<bytes>.
=item B<SCALE> (arrayref, read-only)
-Supported by this driver as proposed by DBI. The only type
-that will return a value currently is C<NUMERIC>.
+Returns a reference to an array of integer values of each column.
+The only type that will return a value currently is C<NUMERIC>.
=item B<NULLABLE> (arrayref, read-only)
@@ -3802,9 +3842,8 @@
=head2 Large Objects
This driver supports all largeobject functions provided by libpq via the
-C<func> method. Please note that, starting with PostgreSQL 6.5, any access to
-a large object -- even read-only large objects -- must be put into a
-transaction!
+C<func> method. Please note that access to a large object, even read-only
+large objects, must be put into a transaction.
=head2 Cursors
@@ -3903,4 +3942,3 @@
See also B<DBI/ACKNOWLEDGMENTS>.
=cut
-
Modified: DBD-Pg/trunk/README
==============================================================================
--- DBD-Pg/trunk/README (original)
+++ DBD-Pg/trunk/README Sat Jul 12 20:25:21 2008
@@ -6,7 +6,7 @@
DESCRIPTION:
------------
-This is version 2.8.4 of DBD::Pg. The web site for this interface, and
+This is version 2.8.5 of DBD::Pg. The web site for this interface, and
the latest version, can be found at:
http://search.cpan.org/dist/DBD-Pg/
Modified: DBD-Pg/trunk/dbdimp.c
==============================================================================
--- DBD-Pg/trunk/dbdimp.c (original)
+++ DBD-Pg/trunk/dbdimp.c Sat Jul 12 20:25:21 2008
@@ -282,7 +282,7 @@
DBI issues a 'rollback' in this case, which causes some debugging
messages
to be emitted from the server (such as "StartTransactionCommand").
However, we can't do
the D_imp_dbh call anymore, because the underlying dbh has lost some
of its magic.
- Unfortunately, DBI then coredumps in dbhh_getcom2. Hence, we make
sure that the
+ Unfortunately, DBI then coredumps in dbh_getcom2. Hence, we make
sure that the
object passed in is still 'valid', in that a certain level has a ROK
flag.
If it's not, we just return without issuing any warning, as we can't
check things
like DBIc_WARN. There may be a better way of handling all this, and
we may want to
Modified: DBD-Pg/trunk/lib/Bundle/DBD/Pg.pm
==============================================================================
--- DBD-Pg/trunk/lib/Bundle/DBD/Pg.pm (original)
+++ DBD-Pg/trunk/lib/Bundle/DBD/Pg.pm Sat Jul 12 20:25:21 2008
@@ -4,7 +4,7 @@
use strict;
use warnings;
-$VERSION = '2.8.4';
+$VERSION = '2.8.5';
1;