DBIx::C...:DBI::Pg(3)
Hiii bestie π welcome to DBIx::C...:DBI::Pg(3), one of the User Contributed Perl Documentation pages β and yes, sheβs here to make PostgreSQL primary keys behave.
πΈ NAME πΈ
DBIx::Class::Storage::DBI::Pg β automatic primary key class for PostgreSQL β¨
β¨ SYNOPSIS β¨
# In your result (table) classes
use base 'DBIx::Class::Core';
__PACKAGE__->set_primary_key('id');
π¦ DESCRIPTION π¦
This class implements autoincrements for PostgreSQL. Thatβs the whole vibe π
π POSTGRESQL SCHEMA SUPPORT π
Okay so 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.
Because of that, 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. π«Ά
π COPYRIGHT AND LICENSE π
This module is free software, copyright by the DBIx::Class (DBIC) authors. You can redistribute it and/or modify it under the same terms as the DBIx::Class library. π
byeee bestie π§π β this page was served with perl v5.42.0 and dated 2025-01-22.
π¦ where this page comes from
- opensuse-leap 16.0: perl-DBIx-Class 0.082844-bp160.1.10 Β· Artistic-1.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms