git.iko.soy/typeable/postgresql-simple
on master help sign in
Tweak capitalization in GenBuiltinTypes
commit094b560c1150a8f9abc2276fa583cd78e6bebe2c authorLeon P Smith <leon@melding-monads.com> dateSun 10 Jun 2012, 04:35 (14 years ago) parentc5571e3
1 file changed+16−22
tools/GenBuiltinTypes.hs+16−22
tools/GenBuiltinTypes.hs+16−22
@@ -1,7 +1,7 @@
11------------------------------------------------------------------------------
22-- |
33-- Module: GenBuiltinTypes
4−-- Copyright: (c) 2011 Leon P Smith
4+-- Copyright: (c) 2011-2012 Leon P Smith
55-- License: BSD3
66-- Maintainer: Leon P Smith <leon@melding-monads.com>
77-- Stability: experimental
@@ -39,13 +39,13 @@ type Map = Map.Map B.ByteString Int
3939builtins :: [(B.ByteString, B.ByteString)]
4040builtins = [strings|
4141bool
42−bytea
42+bytea ByteA
4343char
4444name
4545int8
4646int2
4747int4
48−regproc
48+regproc RegProc
4949text
5050oid
5151tid
@@ -53,7 +53,7 @@ xid
5353cid
5454xml
5555point
56−lseg
56+lseg LSeg
5757path
5858box
5959polygon
@@ -61,26 +61,26 @@ line
6161cidr
6262float4
6363float8
64−abstime
65−reltime
66−tinterval
64+abstime AbsTime
65+reltime RelTime
66+tinterval TInterval
6767unknown
6868circle
6969money
70−macaddr
70+macaddr MacAddr
7171inet
72−bpchar
73−varchar
72+bpchar BpChar
73+varchar VarChar
7474date
7575time
7676timestamp
77−timestamptz TimestampWithTimeZone
77+timestamptz TimestampTZ
7878interval
79−timetz TimeWithTimeZone
79+timetz TimeTZ
8080bit
81−varbit
81+varbit VarBit
8282numeric
83−refcursor
83+refcursor RefCursor
8484record
8585void
8686|]
@@ -89,13 +89,7 @@ instance IsString Blaze.Builder where
8989 fromString = Blaze.fromByteString . fromString
9090
9191main = do
92− conn <- connect ConnectInfo {
93− connectHost = "127.0.0.1",
94− connectPort = 5432,
95− connectUser = "aliadmin",
96− connectPassword = "aliadmin",
97− connectDatabase = "postgres"
98− }
92+ conn <- connectPostgreSQL ""
9993 xs <- query conn "SELECT typname::text, oid::int\
10094 \ FROM pg_type\
10195 \ WHERE typname IN ?"
@@ -130,7 +124,7 @@ renderFile oidmap builtins = ([longstring|
130124------------------------------------------------------------------------------
131125-- |
132126-- Module: Database.PostgreSQL.Simple.BuiltinTypes
133−-- Copyright: (c) 2011 Leon P Smith
127+-- Copyright: (c) 2011-2012 Leon P Smith
134128-- License: BSD3
135129-- Maintainer: Leon P Smith <leon@melding-monads.com>
136130-- Stability: experimental