DBIx::Class::Storage::DBI::Pg(3pm)

DBIx::Class::Storage::DBI::Pg3pm

Automatic primary key class for postgresql

Usage

  # In your result (table) classes
  use base 'DBIx::Class::Core';
  __PACKAGE__->set_primary_key('id');

Overview

This class implements autoincrements for PostgreSQL.

Postgresql schema support

This driver supports multiple PostgreSQL schemas, with one caveat: for performance reasons, data about the search path, sequence names, and so forth is queried as needed and CACHED for subsequent uses.

For this reason, once your schema is instantiated, you should not change the PostgreSQL schema search path for that schema's database connection. If you do, Bad Things may happen.

You should do any necessary manipulation of the search path BEFORE instantiating your schema object, or as part of the on_connect_do option to connect(), for example:

   my $schema = My::Schema->connect
                  ( $dsn,$user,$pass,
                    { on_connect_do =>
                        [ 'SET search_path TO myschema, foo, public' ],
                    },
                  );

Further questions?

Check the list of additional DBIC resources.

Releases

10 releases since Debian 4.0 (Etch); the text changed 8 times.

  1. 4.0
  2. 5.0
  3. 6.0
  4. 7
  5. 8
  6. 9
  7. 10–11
  8. 12
  9. 13

From libdbix-class-perl 0.082844-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.