NAME

Hailo::Storage::Pg - A storage backend for Hailo using DBD::Pg

SYNOPSIS

As a module:

my $hailo = Hailo->new(
    train_file    => 'hailo.trn',
    storage_class => 'Pg',
    storage_args  => {
        dbname    => 'hailo',
        host      => 'localhost',
        port      => '5432',
        options   => '...',
        username  => 'hailo',
        password  => 'hailo'
    },
);

From the command line:

hailo --train        hailo.trn \
      --storage      Pg \
      --storage-args dbname=hailo \
      --storage-args host=localhost \
      --storage-args port=5432 \
      --storage-args options=... \
      --storage-args username=hailo \
      --storage-args password=hailo

Almost all of these options can be omitted, see DBD::Pg's documentation for the default values.

See Hailo's documentation for other non-Pg specific options.

DESCRIPTION

This backend maintains information in a PostgreSQL database.

CAVEATS

It's around 8x-10x slower than the SQLite backend in my tests. Maybe this is due to an unoptimal PostgreSQL configuration (I used the Debian defaults) or perhaps the schema we're using simply suits SQLite better.

AUTHOR

Ævar Arnfjörð Bjarmason <avar@cpan.org>

LICENSE AND COPYRIGHT

Copyright 2010 Ævar Arnfjörð Bjarmason.

This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself.