Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Changes between Version 1 and Version 2 of PostgreSql


Ignore:
Timestamp:
03/01/06 01:51:16 (13 years ago)
Author:
cliff@…
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PostgreSql

    v1 v2  
    1 First of all the docs suggest using a DSN like  
     1PostgreSQL offers a lot of advantages over most other open source databases, but is somewhat less familiar to many people.   
     2 
     3Here's a quick guide to using PostgreSQL with Turbogears. 
     4 
     5 
     6== Selecting the appropriate adapter == 
     7 
     8The Turbogears docs suggest using a DSN like  
    29 
    310{{{ 
     
    1724This ensures that psycopg is the chosen adapter. 
    1825 
     26== Using a Unix domain socket == 
     27As long as you don't require remote access, using a local socket has a lot of advantages over TCP sockets: 
     28 
     29 * Up to 25% faster 
     30 * Easier to secure (uses filesystem permissions) 
     31 * Doesn't waste a TCP port 
     32 
     33With PostgreSQL, if the hostname starts with a /, then the hostname is taken to be an absolute path to a Unix domain 
     34socket rather than a hostname.  However, there are (as of this writing), bugs in the DSN parser for SQLObject that fail 
     35to separate the socket path from the database name.  A DSN like this works around that issue: 
     36 
     37{{{ 
     38psycopg:///dbname?host=/path/to/socket 
     39}}} 
     40 
     41 
     42== Known issues == 
     43 * Catwalk has a bug that causes a hang the first time the application is started with Catwalk mounted.   
     44   The workaround is fairly straightforward: simply create the requisite Catwalk tables by hand then re-run 
     45   the application.   
     46 
     47   The required SQL (at the time of this writing) is: 
     48   {{{ 
     49   CREATE TABLE catwalk_state_table ( 
     50     id INTEGER PRIMARY KEY NOT NULL, 
     51     state BYTEA 
     52   ); 
     53   }}} 
     54 
     55   Use the psql command to run this query and you'll be set.