git.iko.soy/typeable/postgresql-simple
on master help sign in
Tweak static table
1e5c93aLeon P Smith
src/Database/PostgreSQL/Simple/TypeInfo/Static.hs+126−63
@@ -25,6 +25,7 @@ module Database.PostgreSQL.Simple.TypeInfo.Static
25 , int8
25 , int8
26 , int2
26 , int2
27 , int4
27 , int4
28+ , regproc
28 , text
29 , text
29 , oid
30 , oid
30 , tid
31 , tid
@@ -40,9 +41,6 @@ module Database.PostgreSQL.Simple.TypeInfo.Static
40 , cidr
41 , cidr
41 , float4
42 , float4
42 , float8
43 , float8
43− , abstime
44− , reltime
45− , tinterval
46 , unknown
44 , unknown
47 , circle
45 , circle
48 , money
46 , money
@@ -63,6 +61,11 @@ module Database.PostgreSQL.Simple.TypeInfo.Static
63 , record
61 , record
64 , void
62 , void
65 , array_record
63 , array_record
64+ , regprocedure
65+ , regoper
66+ , regoperator
67+ , regclass
68+ , regtype
66 , uuid
69 , uuid
67 , json
70 , json
68 , jsonb
71 , jsonb
@@ -81,6 +84,7 @@ module Database.PostgreSQL.Simple.TypeInfo.Static
81 , array_int2
84 , array_int2
82 , array_int2vector
85 , array_int2vector
83 , array_int4
86 , array_int4
87+ , array_regproc
84 , array_text
88 , array_text
85 , array_tid
89 , array_tid
86 , array_xid
90 , array_xid
@@ -95,9 +99,6 @@ module Database.PostgreSQL.Simple.TypeInfo.Static
95 , array_box
99 , array_box
96 , array_float4
100 , array_float4
97 , array_float8
101 , array_float8
98− , array_abstime
99− , array_reltime
100− , array_tinterval
101 , array_polygon
102 , array_polygon
102 , array_oid
103 , array_oid
103 , array_macaddr
104 , array_macaddr
@@ -112,6 +113,11 @@ module Database.PostgreSQL.Simple.TypeInfo.Static
112 , array_bit
113 , array_bit
113 , array_varbit
114 , array_varbit
114 , array_refcursor
115 , array_refcursor
116+ , array_regprocedure
117+ , array_regoper
118+ , array_regoperator
119+ , array_regclass
120+ , array_regtype
115 , array_uuid
121 , array_uuid
116 , array_jsonb
122 , array_jsonb
117 , int4range
123 , int4range
@@ -140,6 +146,7 @@ staticTypeInfo (Oid x) = case x of
140 20 -> Just int8
146 20 -> Just int8
141 21 -> Just int2
147 21 -> Just int2
142 23 -> Just int4
148 23 -> Just int4
149+ 24 -> Just regproc
143 25 -> Just text
150 25 -> Just text
144 26 -> Just oid
151 26 -> Just oid
145 27 -> Just tid
152 27 -> Just tid
@@ -155,9 +162,6 @@ staticTypeInfo (Oid x) = case x of
155 650 -> Just cidr
162 650 -> Just cidr
156 700 -> Just float4
163 700 -> Just float4
157 701 -> Just float8
164 701 -> Just float8
158− 702 -> Just abstime
159− 703 -> Just reltime
160− 704 -> Just tinterval
161 705 -> Just unknown
165 705 -> Just unknown
162 718 -> Just circle
166 718 -> Just circle
163 790 -> Just money
167 790 -> Just money
@@ -178,6 +182,11 @@ staticTypeInfo (Oid x) = case x of
178 2249 -> Just record
182 2249 -> Just record
179 2278 -> Just void
183 2278 -> Just void
180 2287 -> Just array_record
184 2287 -> Just array_record
185+ 2202 -> Just regprocedure
186+ 2203 -> Just regoper
187+ 2204 -> Just regoperator
188+ 2205 -> Just regclass
189+ 2206 -> Just regtype
181 2950 -> Just uuid
190 2950 -> Just uuid
182 114 -> Just json
191 114 -> Just json
183 3802 -> Just jsonb
192 3802 -> Just jsonb
@@ -196,6 +205,7 @@ staticTypeInfo (Oid x) = case x of
196 1005 -> Just array_int2
205 1005 -> Just array_int2
197 1006 -> Just array_int2vector
206 1006 -> Just array_int2vector
198 1007 -> Just array_int4
207 1007 -> Just array_int4
208+ 1008 -> Just array_regproc
199 1009 -> Just array_text
209 1009 -> Just array_text
200 1010 -> Just array_tid
210 1010 -> Just array_tid
201 1011 -> Just array_xid
211 1011 -> Just array_xid
@@ -210,9 +220,6 @@ staticTypeInfo (Oid x) = case x of
210 1020 -> Just array_box
220 1020 -> Just array_box
211 1021 -> Just array_float4
221 1021 -> Just array_float4
212 1022 -> Just array_float8
222 1022 -> Just array_float8
213− 1023 -> Just array_abstime
214− 1024 -> Just array_reltime
215− 1025 -> Just array_tinterval
216 1027 -> Just array_polygon
223 1027 -> Just array_polygon
217 1028 -> Just array_oid
224 1028 -> Just array_oid
218 1040 -> Just array_macaddr
225 1040 -> Just array_macaddr
@@ -227,6 +234,11 @@ staticTypeInfo (Oid x) = case x of
227 1561 -> Just array_bit
234 1561 -> Just array_bit
228 1563 -> Just array_varbit
235 1563 -> Just array_varbit
229 2201 -> Just array_refcursor
236 2201 -> Just array_refcursor
237+ 2207 -> Just array_regprocedure
238+ 2208 -> Just array_regoper
239+ 2209 -> Just array_regoperator
240+ 2210 -> Just array_regclass
241+ 2211 -> Just array_regtype
230 2951 -> Just array_uuid
242 2951 -> Just array_uuid
231 3807 -> Just array_jsonb
243 3807 -> Just array_jsonb
232 3904 -> Just int4range
244 3904 -> Just int4range
@@ -299,6 +311,14 @@ int4 = Basic {
299 typname = "int4"
311 typname = "int4"
300 }
312 }
301
313
314+regproc :: TypeInfo
315+regproc = Basic {
316+ typoid = Oid 24,
317+ typcategory = 'N',
318+ typdelim = ',',
319+ typname = "regproc"
320+ }
321+
302text :: TypeInfo
322text :: TypeInfo
303text = Basic {
323text = Basic {
304 typoid = Oid 25,
324 typoid = Oid 25,
@@ -419,30 +439,6 @@ float8 = Basic {
419 typname = "float8"
439 typname = "float8"
420 }
440 }
421
441
422−abstime :: TypeInfo
423−abstime = Basic {
424− typoid = Oid 702,
425− typcategory = 'D',
426− typdelim = ',',
427− typname = "abstime"
428− }
429−
430−reltime :: TypeInfo
431−reltime = Basic {
432− typoid = Oid 703,
433− typcategory = 'T',
434− typdelim = ',',
435− typname = "reltime"
436− }
437−
438−tinterval :: TypeInfo
439−tinterval = Basic {
440− typoid = Oid 704,
441− typcategory = 'T',
442− typdelim = ',',
443− typname = "tinterval"
444− }
445−
446unknown :: TypeInfo
442unknown :: TypeInfo
447unknown = Basic {
443unknown = Basic {
448 typoid = Oid 705,
444 typoid = Oid 705,
@@ -604,6 +600,46 @@ array_record = Array {
604 typelem = record
600 typelem = record
605 }
601 }
606
602
603+regprocedure :: TypeInfo
604+regprocedure = Basic {
605+ typoid = Oid 2202,
606+ typcategory = 'N',
607+ typdelim = ',',
608+ typname = "regprocedure"
609+ }
610+
611+regoper :: TypeInfo
612+regoper = Basic {
613+ typoid = Oid 2203,
614+ typcategory = 'N',
615+ typdelim = ',',
616+ typname = "regoper"
617+ }
618+
619+regoperator :: TypeInfo
620+regoperator = Basic {
621+ typoid = Oid 2204,
622+ typcategory = 'N',
623+ typdelim = ',',
624+ typname = "regoperator"
625+ }
626+
627+regclass :: TypeInfo
628+regclass = Basic {
629+ typoid = Oid 2205,
630+ typcategory = 'N',
631+ typdelim = ',',
632+ typname = "regclass"
633+ }
634+
635+regtype :: TypeInfo
636+regtype = Basic {
637+ typoid = Oid 2206,
638+ typcategory = 'N',
639+ typdelim = ',',
640+ typname = "regtype"
641+ }
642+
607uuid :: TypeInfo
643uuid :: TypeInfo
608uuid = Basic {
644uuid = Basic {
609 typoid = Oid 2950,
645 typoid = Oid 2950,
@@ -763,6 +799,15 @@ array_int4 = Array {
763 typelem = int4
799 typelem = int4
764 }
800 }
765
801
802+array_regproc :: TypeInfo
803+array_regproc = Array {
804+ typoid = Oid 1008,
805+ typcategory = 'A',
806+ typdelim = ',',
807+ typname = "_regproc",
808+ typelem = regproc
809+ }
810+
766array_text :: TypeInfo
811array_text :: TypeInfo
767array_text = Array {
812array_text = Array {
768 typoid = Oid 1009,
813 typoid = Oid 1009,
@@ -889,33 +934,6 @@ array_float8 = Array {
889 typelem = float8
934 typelem = float8
890 }
935 }
891
936
892−array_abstime :: TypeInfo
893−array_abstime = Array {
894− typoid = Oid 1023,
895− typcategory = 'A',
896− typdelim = ',',
897− typname = "_abstime",
898− typelem = abstime
899− }
900−
901−array_reltime :: TypeInfo
902−array_reltime = Array {
903− typoid = Oid 1024,
904− typcategory = 'A',
905− typdelim = ',',
906− typname = "_reltime",
907− typelem = reltime
908− }
909−
910−array_tinterval :: TypeInfo
911−array_tinterval = Array {
912− typoid = Oid 1025,
913− typcategory = 'A',
914− typdelim = ',',
915− typname = "_tinterval",
916− typelem = tinterval
917− }
918−
919array_polygon :: TypeInfo
937array_polygon :: TypeInfo
920array_polygon = Array {
938array_polygon = Array {
921 typoid = Oid 1027,
939 typoid = Oid 1027,
@@ -1042,6 +1060,51 @@ array_refcursor = Array {
1042 typelem = refcursor
1060 typelem = refcursor
1043 }
1061 }
1044
1062
1063+array_regprocedure :: TypeInfo
1064+array_regprocedure = Array {
1065+ typoid = Oid 2207,
1066+ typcategory = 'A',
1067+ typdelim = ',',
1068+ typname = "_regprocedure",
1069+ typelem = regprocedure
1070+ }
1071+
1072+array_regoper :: TypeInfo
1073+array_regoper = Array {
1074+ typoid = Oid 2208,
1075+ typcategory = 'A',
1076+ typdelim = ',',
1077+ typname = "_regoper",
1078+ typelem = regoper
1079+ }
1080+
1081+array_regoperator :: TypeInfo
1082+array_regoperator = Array {
1083+ typoid = Oid 2209,
1084+ typcategory = 'A',
1085+ typdelim = ',',
1086+ typname = "_regoperator",
1087+ typelem = regoperator
1088+ }
1089+
1090+array_regclass :: TypeInfo
1091+array_regclass = Array {
1092+ typoid = Oid 2210,
1093+ typcategory = 'A',
1094+ typdelim = ',',
1095+ typname = "_regclass",
1096+ typelem = regclass
1097+ }
1098+
1099+array_regtype :: TypeInfo
1100+array_regtype = Array {
1101+ typoid = Oid 2211,
1102+ typcategory = 'A',
1103+ typdelim = ',',
1104+ typname = "_regtype",
1105+ typelem = regtype
1106+ }
1107+
1045array_uuid :: TypeInfo
1108array_uuid :: TypeInfo
1046array_uuid = Array {
1109array_uuid = Array {
1047 typoid = Oid 2951,
1110 typoid = Oid 2951,
tools/GenTypeInfo.hs+12−6
@@ -88,6 +88,7 @@ name
88int8
88int8
89int2
89int2
90int4
90int4
91+regproc
91text
92text
92oid
93oid
93tid
94tid
@@ -103,9 +104,6 @@ line
103cidr
104cidr
104float4
105float4
105float8
106float8
106−abstime
107−reltime
108−tinterval
109unknown
107unknown
110circle
108circle
111money
109money
@@ -126,6 +124,11 @@ refcursor
126record
124record
127void
125void
128_record array_record
126_record array_record
127+regprocedure
128+regoper
129+regoperator
130+regclass
131+regtype
129uuid
132uuid
130json
133json
131jsonb
134jsonb
@@ -144,6 +147,7 @@ _name array_name
144_int2 array_int2
147_int2 array_int2
145_int2vector array_int2vector
148_int2vector array_int2vector
146_int4 array_int4
149_int4 array_int4
150+_regproc array_regproc
147_text array_text
151_text array_text
148_tid array_tid
152_tid array_tid
149_xid array_xid
153_xid array_xid
@@ -158,9 +162,6 @@ _path array_path
158_box array_box
162_box array_box
159_float4 array_float4
163_float4 array_float4
160_float8 array_float8
164_float8 array_float8
161−_abstime array_abstime
162−_reltime array_reltime
163−_tinterval array_tinterval
164_polygon array_polygon
165_polygon array_polygon
165_oid array_oid
166_oid array_oid
166_macaddr array_macaddr
167_macaddr array_macaddr
@@ -175,6 +176,11 @@ _timetz array_timetz
175_bit array_bit
176_bit array_bit
176_varbit array_varbit
177_varbit array_varbit
177_refcursor array_refcursor
178_refcursor array_refcursor
179+_regprocedure array_regprocedure
180+_regoper array_regoper
181+_regoperator array_regoperator
182+_regclass array_regclass
183+_regtype array_regtype
178_uuid array_uuid
184_uuid array_uuid
179_jsonb array_jsonb
185_jsonb array_jsonb
180int4range
186int4range