@@ -78,18 +78,8 @@ var parseIntegerArray = function(val) {
78
78
} ;
79
79
80
80
var parseFloatArray = function ( val ) {
81
- deprecate ( 'parsing and returning floats from PostgreSQL server is deprecated' ,
82
- 'JavaScript has a hard time with floats and there is precision loss which can cause' ,
83
- 'unexpected, hard to trace, potentially bad bugs in your program' ,
84
- 'for more information see the following:' ,
85
- 'https://github.com/brianc/node-postgres/pull/271' ,
86
- 'in node-postgres v1.0.0 all floats & decimals will be returned as strings' ,
87
- 'feel free to get in touch via a github issue if you have any questions' ) ;
88
81
if ( ! val ) { return null ; }
89
- var p = arrayParser . create ( val , function ( entry ) {
90
- if ( entry !== null ) {
91
- entry = parseFloat ( entry , 10 ) ;
92
- }
82
+ var p = arrayParser . create ( val , function ( entry ) {
93
83
return entry ;
94
84
} ) ;
95
85
@@ -171,36 +161,18 @@ var parseInteger = function(val) {
171
161
return parseInt ( val , 10 ) ;
172
162
} ;
173
163
174
- var parseFloatAndWarn = function ( val ) {
175
- deprecate ( 'parsing and returning floats from PostgreSQL server is deprecated' ,
176
- 'JavaScript has a hard time with floats and there is precision loss which can cause' ,
177
- 'unexpected, hard to trace, potentially bad bugs in your program' ,
178
- 'for more information see the following:' ,
179
- 'https://github.com/brianc/node-postgres/pull/271' ,
180
- 'in node-postgres v1.0.0 all floats & decimals will be returned as strings' ) ;
181
- return parseFloat ( val ) ;
182
- } ;
183
-
184
164
var init = function ( register ) {
185
165
register ( 20 , parseInteger ) ;
186
166
register ( 21 , parseInteger ) ;
187
167
register ( 23 , parseInteger ) ;
188
168
register ( 26 , parseInteger ) ;
189
- //TODO remove for v1.0
190
- register ( 1700 , parseFloatAndWarn ) ;
191
- //TODO remove for v1.0
192
- register ( 700 , parseFloatAndWarn ) ;
193
- //TODO remove for v1.0
194
- register ( 701 , parseFloatAndWarn ) ;
195
169
register ( 16 , parseBool ) ;
196
170
register ( 1082 , parseDate ) ; // date
197
171
register ( 1114 , parseDate ) ; // timestamp without timezone
198
172
register ( 1184 , parseDate ) ; // timestamp
199
173
register ( 1005 , parseIntegerArray ) ; // _int2
200
174
register ( 1007 , parseIntegerArray ) ; // _int4
201
175
register ( 1016 , parseIntegerArray ) ; // _int8
202
- register ( 1021 , parseFloatArray ) ; // _float4
203
- register ( 1022 , parseFloatArray ) ; // _float8
204
176
register ( 1231 , parseIntegerArray ) ; // _numeric
205
177
register ( 1014 , parseStringArray ) ; //char
206
178
register ( 1015 , parseStringArray ) ; //varchar
0 commit comments