example PostgreSQL: switch from 'testdb' to 'hrrtest'.

This commit is contained in:
Kei Hibino 2017-01-28 17:21:24 +09:00
parent fe6da06983
commit 85d907e661
2 changed files with 7 additions and 7 deletions

View File

@ -10,7 +10,7 @@ import Database.HDBC.Schema.Driver (typeMap)
import Database.HDBC.Query.TH (defineTableFromDB)
connect :: IO Connection
connect = connectPostgreSQL "dbname=testdb"
connect = connectPostgreSQL "dbname=hrrtest"
defineTable :: [(String, TypeQ)] -> String -> String -> [Name] -> Q [Dec]
defineTable tmap =

View File

@ -1,20 +1,20 @@
This example requires user access to PostgreSQL database
which is named 'testdb' over UNIX domain socket.
which is named 'hrrtest' over UNIX domain socket.
## Creating 'testdb'
## Creating 'hrrtest'
% createdb testdb
% createdb hrrtest
## Example 1 case
% ./1/create.sh
% runghc -i1 ./1/queryExample.hs
% psql hrrtest < ./1/create.sql
% runghc -i1 ./1/query.hs
...
## Example 3 case
% ./3/create.sh
% psql hrrtest < ./3/create.sql
% runghc -i3 ./3/query.hs