Hy!<br><br>I use DBIC's on_connect_do parameter to switch to the right pg schema like this in the config:<br><Model::Yourschema><br> <connect_info><br> dsn dbi:Pg:host=localhost;dbname=yourdb<br>
user youruser<br> password yourpw<br> pg_enable_utf8 1<br> on_connect_do SET search_path TO yourschema<br> </connect_info><br></Model::Yourschema><br><br><div class="gmail_quote">
2010/10/20 Hetényi Csaba <span dir="ltr"><<a href="mailto:csabiwork@tata.hu">csabiwork@tata.hu</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Dear All<br>
<br>
Please forgive me, may i must ask this question on DBIX maillist.<br>
<br>
I'd like to use "script/???_<a href="http://create.pl" target="_blank">create.pl</a>" helper script to create<br>
model from a PostgreSql database.<br>
But my tables are not in the default Postgre tablespace (public).<br>
<br>
Is this helper script capable to automatically create model for<br>
the non-default tablespace?<br>
<br>
If i run the script the standard way:<br>
<br>
script/<a href="http://pcm_create.pl" target="_blank">pcm_create.pl</a> model DB DBIC::Schema Pcm::Schema create=static components=TimeStamp,EncodedColumn 'dbi:Pg:dbname=pcmv2;host=xxx.xx' 'pcmuser' 'xxx' '{ AutoCommit => 1 }'<br>
<br>
the script dumps schema without errors:<br>
<br>
...<br>
Dumping manual schema for Pcm::Schema to directory /home/csabi/Dev/Pcm/script/../lib ...<br>
Schema dump completed.<br>
created "/home/csabi/Dev/Pcm/script/../lib/Pcm/Model/DB.pm"<br>
created "/home/csabi/Dev/Pcm/script/../t/model_DB.t"<br>
<br>
But when starting the application it says:<br>
<br>
******************************* WARNING ***************************************<br>
* No sources found (did you forget to define your tables?) *<br>
* *<br>
* To turn off this warning, set the CMDS_NO_SOURCES environment variable. *<br>
*******************************************************************************<br>
<br>
which is correct, because there is no tables in the default "public" pg schema.<br>
My tables are in the manually created "pcmbiz" schema.<br>
<br>
Thank You in advance!<br>
<br>
-- <br>
Hetényi Csaba<br>
<br>
<br>
<br>
_______________________________________________<br>
List: <a href="mailto:Catalyst@lists.scsys.co.uk" target="_blank">Catalyst@lists.scsys.co.uk</a><br>
Listinfo: <a href="http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst" target="_blank">http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst</a><br>
Searchable archive: <a href="http://www.mail-archive.com/catalyst@lists.scsys.co.uk/" target="_blank">http://www.mail-archive.com/catalyst@lists.scsys.co.uk/</a><br>
Dev site: <a href="http://dev.catalyst.perl.org/" target="_blank">http://dev.catalyst.perl.org/</a><br>
</blockquote></div><br>