@@ -142,14 +142,14 @@ static void escape_test(HSTMT hstmt)
142
142
executeQuery (hstmt );
143
143
144
144
prepareQuery (hstmt , "{ ? = call length('foo') }" );
145
- pg_memset (outbuf1 , 0 , sizeof (outbuf1 ));
145
+ memset (outbuf1 , 0 , sizeof (outbuf1 ));
146
146
bindOutParamString (hstmt , 1 , NULL , outbuf1 , sizeof (outbuf1 ) - 1 , 0 );
147
147
executeQuery (hstmt );
148
148
printf ("OUT param: %s\n" , outbuf1 );
149
149
150
150
/* It's preferable to cast VARIADIC any fields */
151
151
prepareQuery (hstmt , "{ ? = call concat(?::text, ?::text) }" );
152
- pg_memset (outbuf1 , 0 , sizeof (outbuf1 ));
152
+ memset (outbuf1 , 0 , sizeof (outbuf1 ));
153
153
bindOutParamString (hstmt , 1 , NULL , outbuf1 , sizeof (outbuf1 ) - 1 , 0 );
154
154
bindParamString (hstmt , 2 , NULL , "foo" );
155
155
bindParamString (hstmt , 3 , NULL , "bar" );
@@ -172,22 +172,22 @@ static void escape_test(HSTMT hstmt)
172
172
173
173
/**** call procedure with out and i-o parameters ****/
174
174
prepareQuery (hstmt , "{call a_b_c_d_e(?, ?, ?, ?, ?)}" );
175
- pg_memset (outbuf1 , 0 , sizeof (outbuf1 ));
175
+ memset (outbuf1 , 0 , sizeof (outbuf1 ));
176
176
bindOutParamString (hstmt , 1 , NULL , outbuf1 , sizeof (outbuf1 ) - 1 , 0 );
177
177
bindParamString (hstmt , 2 , NULL , "2017-02-23 11:34:46" );
178
178
strcpy (outbuf3 , "4" );
179
179
bindOutParamString (hstmt , 3 , NULL , outbuf3 , sizeof (outbuf3 ) - 1 , 1 );
180
180
bindParamString (hstmt , 4 , NULL , "3.4" );
181
- pg_memset (outbuf5 , 0 , sizeof (outbuf5 ));
181
+ memset (outbuf5 , 0 , sizeof (outbuf5 ));
182
182
bindOutParamString (hstmt , 5 , NULL , outbuf5 , sizeof (outbuf5 ) - 1 , 0 );
183
183
executeQuery (hstmt );
184
184
printf ("OUT params: %s : %s : %s\n" , outbuf1 , outbuf3 , outbuf5 );
185
185
186
186
/**** call procedure parameters by name (e,a,b,c,d) ****/
187
187
prepareQuery (hstmt , "{call a_b_c_d_e(?, ?, ?, ?, ?)}" );
188
- pg_memset (outbuf5 , 0 , sizeof (outbuf5 ));
188
+ memset (outbuf5 , 0 , sizeof (outbuf5 ));
189
189
bindOutParamString (hstmt , 1 , "e" , outbuf5 , sizeof (outbuf5 ) - 1 , 0 );
190
- pg_memset (outbuf1 , 0 , sizeof (outbuf1 ));
190
+ memset (outbuf1 , 0 , sizeof (outbuf1 ));
191
191
bindOutParamString (hstmt , 2 , "a" , outbuf1 , sizeof (outbuf1 ) - 1 , 0 );
192
192
bindParamString (hstmt , 3 , "b" , "2017-02-23 11:34:46" );
193
193
strcpy (outbuf3 , "4" );
@@ -202,9 +202,9 @@ static void escape_test(HSTMT hstmt)
202
202
strcpy (outbuf3 , "4" );
203
203
bindOutParamString (hstmt , 2 , "c" , outbuf3 , sizeof (outbuf3 ) - 1 , 1 );
204
204
bindParamString (hstmt , 3 , "d" , "3.4" );
205
- pg_memset (outbuf5 , 0 , sizeof (outbuf5 ));
205
+ memset (outbuf5 , 0 , sizeof (outbuf5 ));
206
206
bindOutParamString (hstmt , 4 , "e" , outbuf5 , sizeof (outbuf5 ) - 1 , 0 );
207
- pg_memset (outbuf1 , 0 , sizeof (outbuf1 ));
207
+ memset (outbuf1 , 0 , sizeof (outbuf1 ));
208
208
bindOutParamString (hstmt , 5 , "a" , outbuf1 , sizeof (outbuf1 ) - 1 , 0 );
209
209
executeQuery (hstmt );
210
210
printf ("OUT params: %s : %s : %s\n" , outbuf1 , outbuf3 , outbuf5 );
0 commit comments