pg: Add send/recv support for a few more easy types
This commit is contained in:
parent
30b457d2b8
commit
7f1c48e0cf
4 changed files with 222 additions and 25 deletions
16
FU/PG.pm
16
FU/PG.pm
|
|
@ -385,19 +385,15 @@ as well. Much older versions will certainly not work fine.
|
|||
|
||||
=item * (Probably) not thread-safe.
|
||||
|
||||
=item * Only supports the UTF-8 encoding for string columns (text, char,
|
||||
varchar, etc). When using the binary format (the default) this only works if
|
||||
your database encoding is UTF-8. Non-UTF-8 databases are still supported with
|
||||
the text format by setting `client_encoding=utf8` as part of the connection
|
||||
string or by manually switching to it after C<connect()>:
|
||||
=item * Only supports the UTF-8 encoding for all text strings sent to and
|
||||
received from the PostgreSQL server. The encoding is assumed to be UTF-8 by
|
||||
default, but if this may not be the case in your situation, setting
|
||||
`client_encoding=utf8` as part of the connection string or manually switching
|
||||
to it after C<connect()> is always safe:
|
||||
|
||||
my $conn = FU::PG->connect("")->text;
|
||||
my $conn = FU::PG->connect('');
|
||||
$conn->exec('SET client_encoding=utf8');
|
||||
|
||||
(But you're missing out on most features this module has to offer if you're
|
||||
stuck with the text format, so L<DBD::Pg> might be a better choice in that
|
||||
case)
|
||||
|
||||
=item * Only works with blocking (synchronous) calls, not very suitable for use
|
||||
in asynchronous frameworks unless you know your queries are fast and you have a
|
||||
low-latency connection with the Postgres server.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue