@@ -36,7 +36,7 @@ typedef struct
36
36
do { \
37
37
if ( state->cur - state->word + 1 >= state->wordlen ) \
38
38
{ \
39
- int4 clen = state->cur - state->word; \
39
+ int32 clen = state->cur - state->word; \
40
40
state->wordlen *= 2; \
41
41
state->word = (char*)repalloc( (void*)state->word, state->wordlen ); \
42
42
state->cur = state->word + clen; \
@@ -74,7 +74,7 @@ get_val(HSParser *state, bool ignoreeq, bool *escaped)
74
74
}
75
75
else if (* (state -> ptr ) == '=' && !ignoreeq )
76
76
{
77
- elog (ERROR , "Syntax error near '%c' at position %d" , * (state -> ptr ), (int4 ) (state -> ptr - state -> begin ));
77
+ elog (ERROR , "Syntax error near '%c' at position %d" , * (state -> ptr ), (int32 ) (state -> ptr - state -> begin ));
78
78
}
79
79
else if (* (state -> ptr ) == '\\' )
80
80
{
@@ -215,7 +215,7 @@ parse_hstore(HSParser *state)
215
215
}
216
216
else if (!isspace ((unsigned char ) * (state -> ptr )))
217
217
{
218
- elog (ERROR , "Syntax error near '%c' at position %d" , * (state -> ptr ), (int4 ) (state -> ptr - state -> begin ));
218
+ elog (ERROR , "Syntax error near '%c' at position %d" , * (state -> ptr ), (int32 ) (state -> ptr - state -> begin ));
219
219
}
220
220
}
221
221
else if (st == WGT )
@@ -230,7 +230,7 @@ parse_hstore(HSParser *state)
230
230
}
231
231
else
232
232
{
233
- elog (ERROR , "Syntax error near '%c' at position %d" , * (state -> ptr ), (int4 ) (state -> ptr - state -> begin ));
233
+ elog (ERROR , "Syntax error near '%c' at position %d" , * (state -> ptr ), (int32 ) (state -> ptr - state -> begin ));
234
234
}
235
235
}
236
236
else if (st == WVAL )
@@ -263,7 +263,7 @@ parse_hstore(HSParser *state)
263
263
}
264
264
else if (!isspace ((unsigned char ) * (state -> ptr )))
265
265
{
266
- elog (ERROR , "Syntax error near '%c' at position %d" , * (state -> ptr ), (int4 ) (state -> ptr - state -> begin ));
266
+ elog (ERROR , "Syntax error near '%c' at position %d" , * (state -> ptr ), (int32 ) (state -> ptr - state -> begin ));
267
267
}
268
268
}
269
269
else
@@ -304,7 +304,7 @@ comparePairs(const void *a, const void *b)
304
304
* and (b) who knows whether they might be needed by some caller.
305
305
*/
306
306
int
307
- hstoreUniquePairs (Pairs * a , int4 l , int4 * buflen )
307
+ hstoreUniquePairs (Pairs * a , int32 l , int32 * buflen )
308
308
{
309
309
Pairs * ptr ,
310
310
* res ;
@@ -367,14 +367,14 @@ hstoreCheckValLen(size_t len)
367
367
368
368
369
369
HStore *
370
- hstorePairs (Pairs * pairs , int4 pcount , int4 buflen )
370
+ hstorePairs (Pairs * pairs , int32 pcount , int32 buflen )
371
371
{
372
372
HStore * out ;
373
373
HEntry * entry ;
374
374
char * ptr ;
375
375
char * buf ;
376
- int4 len ;
377
- int4 i ;
376
+ int32 len ;
377
+ int32 i ;
378
378
379
379
len = CALCDATASIZE (pcount , buflen );
380
380
out = palloc (len );
@@ -402,7 +402,7 @@ Datum
402
402
hstore_in (PG_FUNCTION_ARGS )
403
403
{
404
404
HSParser state ;
405
- int4 buflen ;
405
+ int32 buflen ;
406
406
HStore * out ;
407
407
408
408
state .begin = PG_GETARG_CSTRING (0 );
@@ -422,11 +422,11 @@ Datum hstore_recv(PG_FUNCTION_ARGS);
422
422
Datum
423
423
hstore_recv (PG_FUNCTION_ARGS )
424
424
{
425
- int4 buflen ;
425
+ int32 buflen ;
426
426
HStore * out ;
427
427
Pairs * pairs ;
428
- int4 i ;
429
- int4 pcount ;
428
+ int32 i ;
429
+ int32 pcount ;
430
430
StringInfo buf = (StringInfo ) PG_GETARG_POINTER (0 );
431
431
432
432
pcount = pq_getmsgint (buf , 4 );
@@ -518,7 +518,7 @@ Datum hstore_from_arrays(PG_FUNCTION_ARGS);
518
518
Datum
519
519
hstore_from_arrays (PG_FUNCTION_ARGS )
520
520
{
521
- int4 buflen ;
521
+ int32 buflen ;
522
522
HStore * out ;
523
523
Pairs * pairs ;
524
524
Datum * key_datums ;
@@ -632,7 +632,7 @@ hstore_from_array(PG_FUNCTION_ARGS)
632
632
ArrayType * in_array = PG_GETARG_ARRAYTYPE_P (0 );
633
633
int ndims = ARR_NDIM (in_array );
634
634
int count ;
635
- int4 buflen ;
635
+ int32 buflen ;
636
636
HStore * out ;
637
637
Pairs * pairs ;
638
638
Datum * in_datums ;
@@ -737,7 +737,7 @@ Datum
737
737
hstore_from_record (PG_FUNCTION_ARGS )
738
738
{
739
739
HeapTupleHeader rec ;
740
- int4 buflen ;
740
+ int32 buflen ;
741
741
HStore * out ;
742
742
Pairs * pairs ;
743
743
Oid tupType ;
0 commit comments