NAME

DBIO::PostgreSQL::EV::ConnectInfo - PostgreSQL connection string utilities for DBIO async driver

VERSION

version 0.900001

my $escaped = escape_conninfo($value);

Escape a single connection parameter value for use in a libpq conninfo string. Handles whitespace, single quotes, and backslashes.

my $str = conninfo_string({ host => 'localhost', port => 5432 });

Convert a hashref of connection parameters into a libpq connection string. Skips undefined values.

my $async_info = dbi_to_conninfo([ 'dbi:Pg:dbname=test;host=localhost', $user, $pass, \%attrs ]);

Translate a DBI-style connect-info arrayref ([$dsn, $user, $pass, \%attrs], as produced by the sync DBIO::PostgreSQL::Storage) into the async [ \%conninfo, \%opts ] shape consumed by DBIO::PostgreSQL::EV::Storage.

The dbi:Pg: DSN is parsed into named libpq parameters (dbname, host, port, ...); database is normalised to dbname. $user / $pass fill in user / password when not already present. A pool_size attribute, if given, is carried into the conninfo hash. Dies unless the DSN is in dbi:Pg: form, since libpq does not understand it.

AUTHOR

DBIO Authors

COPYRIGHT AND LICENSE

Copyright (C) 2026 DBIO Authors

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

3 POD Errors

The following errors were encountered while parsing the POD:

Around line 67:

Unknown directive: =func

Around line 74:

Unknown directive: =func

Around line 81:

Unknown directive: =func