Hy!

I use DBIC's on_connect_do parameter to switch to the right pg schema like
this in the config:
<Model::Yourschema>
    <connect_info>
        dsn      dbi:Pg:host=localhost;dbname=yourdb
        user     youruser
        password yourpw
        pg_enable_utf8 1
        on_connect_do SET search_path TO yourschema
    </connect_info>
</Model::Yourschema>

2010/10/20 Hetényi Csaba <csabiw...@tata.hu>

>  Dear All
>
> Please forgive me, may i must ask this question on DBIX maillist.
>
> I'd like to use "script/???_create.pl"  helper script to create
> model from a PostgreSql database.
> But my tables are not in the default Postgre tablespace (public).
>
> Is this helper script capable to automatically create model for
> the non-default tablespace?
>
> If i run the script the standard way:
>
> script/pcm_create.pl model DB DBIC::Schema Pcm::Schema create=static
> components=TimeStamp,EncodedColumn 'dbi:Pg:dbname=pcmv2;host=xxx.xx'
> 'pcmuser' 'xxx' '{ AutoCommit => 1 }'
>
> the script dumps schema without errors:
>
> ...
> Dumping manual schema for Pcm::Schema to directory
> /home/csabi/Dev/Pcm/script/../lib ...
> Schema dump completed.
> created "/home/csabi/Dev/Pcm/script/../lib/Pcm/Model/DB.pm"
> created "/home/csabi/Dev/Pcm/script/../t/model_DB.t"
>
> But when starting the application it says:
>
> ******************************* WARNING
> ***************************************
> * No sources found (did you forget to define your tables?)
>    *
> *
>   *
> * To turn off this warning, set the CMDS_NO_SOURCES environment variable.
>   *
>
> *******************************************************************************
>
> which is correct, because there is no tables in the default "public" pg
> schema.
> My tables are in the manually created "pcmbiz" schema.
>
> Thank You in advance!
>
> --
> Hetényi Csaba
>
>
>
> _______________________________________________
> List: Catalyst@lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive:
> http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/
>
_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/

Reply via email to