* Setup instructions 1. Download the latest PostgreSQL source and uncompress them. http://www.postgresql.org/ftp/source/v8.0.1/ 2. Compile PostgreSQL with SSL support. ./configure --with-openssl make make install 3. Put your postgresqlprefix/bin and lib in your path. 4. Initialize the database. initdb 5. Create the SSL certificate. Go to and execute: openssl req -new -text -out server.req openssl rsa -in privkey.pem -out server.key rm privkey.pem openssl req -x509 -in server.req -text -key server.key -out server.crt chmod og-rwx server.key Reference: http://www.postgresql.org/docs/7.4/static/ssl-tcp.html 6. Start the server pg_ctl -o "-i" -D start 7. Create the test database createdb npgsql_tests 8. Create npgsql_tests user createuser -NP npgsql_tests and answer the questions - use npgsql_tests for the password Enter password for new user: Enter it again: Shall the new user be allowed to create databases? (y/n) y Shall the new user be allowed to create more new users? (y/n) y CREATE USER 8. Run the script to create some data. sh makewords.sh 338 This will insert 338 rows to a table called wordlist created by script above. 9. Compile the test tool (npdbtest.cs) make * Notes Many thanks to Francisco Figueiredo Jr. to have supplied me the instructions and the original sample code.