hi...<br><br>  you can try to use host to indicate which server you want to connect with.. like:<br><br>adbapi.ConnectionPool(&#39;xxx&#39;, host=&#39;localhost&#39;, user=&#39;twww&#39;,pwd=&#39;eee&#39;) <br><br><br><br>
<div class="gmail_quote">On Wed, Jul 13, 2011 at 9:08 AM, bino oetomo <span dir="ltr">&lt;<a href="mailto:bino@indoakses-online.com">bino@indoakses-online.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Dear All ..<br>
<br>
Base on a need, I need to build a JSON-RPC to Postgres &quot;bridge&quot;.<br>
For now, I try to take the ORM way, so I&#39;m looking for ORM &quot;engine&quot; that<br>
work well with Twisted and support for Postgres as it&#39;s backend.<br>
<br>
First try I look into SqlAlchemy ... but there is a lot of talk that<br>
SqlAlchemy did not work well with Twisted.<br>
I found that Twistar have a support for postgres backend.<br>
<br>
All sample script I found only look like this :<br>
for MySQL driver<br>
---Start----<br>
from twisted.enterprise import adbapi<br>
from twistar.registry import Registry<br>
<br>
Registry.DBPOOL = adbapi.ConnectionPool(&#39;MySQLdb&#39;, user=&quot;twistar&quot;,<br>
passwd=&quot;apass&quot;, db=&quot;twistar&quot;)<br>
---Stop----<br>
<br>
and I thing for postgres it will be like :<br>
---Start----<br>
from twisted.enterprise import adbapi<br>
from twistar.registry import Registry<br>
<br>
Registry.DBPOOL = adbapi.ConnectionPool(&#39;psycopg2&#39;, user=&quot;twistar&quot;,<br>
passwd=&quot;apass&quot;, db=&quot;twistar&quot;)<br>
---Stop----<br>
<br>
Is that right ?<br>
If So ... where to put the db server ip address (i.e : my Postgres<br>
server is at 192.168.10.232) ?<br>
<br>
Sincerely<br>
-bino-<br>
<br>
_______________________________________________<br>
Twisted-Python mailing list<br>
<a href="mailto:Twisted-Python@twistedmatrix.com">Twisted-Python@twistedmatrix.com</a><br>
<a href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python" target="_blank">http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python</a><br>
</blockquote></div><br>