[Dbix-class] A problem with Postgres schemas

Brandon Black blblack at gmail.com
Thu Dec 28 21:16:50 GMT 2006


On 12/28/06, Kevin Esteb <kesteb at wsipc.org> wrote:
> I new to DBIx::Class, so please bear with me.
>
> I am running RHEL4 and have a postgres database with a schema named
> "analog". The DBIx::Class modules are the latest and greatest from CPAN,
> so is the DBD and the DBI for postgres. When I run the below code, I get
> this error:
>
> DBIx::Class::Schema::resultset(): Can't find source for analog.master at
> test9.pl line 28
>

Your table named analog.master has a source/resultset name of "Master"
in your example, so you should get at the resultset via
$schema->resultset('Master'), instead of
$schema->resultset('analog.master');

If you are going to have multiple postgres schemas used within this
DBIx::Class::Schema, it is probably advisable to encode the schema
name in the source name, which means changing Test::Schema::Master to
Test::Schema::Analog::Master, and the accessing via
$schema->resultset('Analog::Master');

-- Brandon



More information about the Dbix-class mailing list