4 1. Download the latest PostgreSQL source and uncompress them.
6 http://www.postgresql.org/ftp/source/v8.0.1/
9 2. Compile PostgreSQL with SSL support.
11 ./configure --with-openssl
16 3. Put your postgresqlprefix/bin and lib in your path.
19 4. Initialize the database.
21 initdb <path to where you want to initialize data>
24 5. Create the SSL certificate.
26 Go to <path to where you want to initialize data> and execute:
28 openssl req -new -text -out server.req
29 openssl rsa -in privkey.pem -out server.key
31 openssl req -x509 -in server.req -text -key server.key -out server.crt
32 chmod og-rwx server.key
34 Reference: http://www.postgresql.org/docs/7.4/static/ssl-tcp.html
39 pg_ctl -o "-i" -D <path to where you want to initialize data> start
42 7. Create the test database
47 8. Create npgsql_tests user
49 createuser -NP npgsql_tests
51 and answer the questions - use npgsql_tests for the password
53 Enter password for new user:
55 Shall the new user be allowed to create databases? (y/n) y
56 Shall the new user be allowed to create more new users? (y/n) y
59 8. Run the script to create some data.
63 This will insert 338 rows to a table called wordlist created by script
67 9. Compile the test tool (npdbtest.cs)
74 Many thanks to Francisco Figueiredo Jr. to have supplied me the instructions
75 and the original sample code.