diff options
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/hstore/hstore_gin.c | 2 | ||||
-rw-r--r-- | contrib/hstore/hstore_gist.c | 4 | ||||
-rw-r--r-- | contrib/hstore/hstore_io.c | 6 | ||||
-rw-r--r-- | contrib/hstore/hstore_op.c | 12 | ||||
-rw-r--r-- | contrib/pageinspect/btreefuncs.c | 2 | ||||
-rw-r--r-- | contrib/pageinspect/ginfuncs.c | 5 | ||||
-rw-r--r-- | contrib/pageinspect/hashfuncs.c | 8 | ||||
-rw-r--r-- | contrib/pageinspect/heapfuncs.c | 4 | ||||
-rw-r--r-- | contrib/pg_trgm/trgm_op.c | 2 | ||||
-rw-r--r-- | contrib/pgcrypto/pgp-pgsql.c | 4 |
10 files changed, 27 insertions, 22 deletions
diff --git a/contrib/hstore/hstore_gin.c b/contrib/hstore/hstore_gin.c index 4c3a422643d..908530261ae 100644 --- a/contrib/hstore/hstore_gin.c +++ b/contrib/hstore/hstore_gin.c @@ -119,7 +119,7 @@ gin_extract_hstore_query(PG_FUNCTION_ARGS) text *item; deconstruct_array(query, - TEXTOID, -1, false, 'i', + TEXTOID, -1, false, TYPALIGN_INT, &key_datums, &key_nulls, &key_count); entries = (Datum *) palloc(sizeof(Datum) * key_count); diff --git a/contrib/hstore/hstore_gist.c b/contrib/hstore/hstore_gist.c index e860f1e4d35..d198c4b7d77 100644 --- a/contrib/hstore/hstore_gist.c +++ b/contrib/hstore/hstore_gist.c @@ -555,7 +555,7 @@ ghstore_consistent(PG_FUNCTION_ARGS) int i; deconstruct_array(query, - TEXTOID, -1, false, 'i', + TEXTOID, -1, false, TYPALIGN_INT, &key_datums, &key_nulls, &key_count); for (i = 0; res && i < key_count; ++i) @@ -578,7 +578,7 @@ ghstore_consistent(PG_FUNCTION_ARGS) int i; deconstruct_array(query, - TEXTOID, -1, false, 'i', + TEXTOID, -1, false, TYPALIGN_INT, &key_datums, &key_nulls, &key_count); res = false; diff --git a/contrib/hstore/hstore_io.c b/contrib/hstore/hstore_io.c index f3174f29951..60bdbea46be 100644 --- a/contrib/hstore/hstore_io.c +++ b/contrib/hstore/hstore_io.c @@ -560,7 +560,7 @@ hstore_from_arrays(PG_FUNCTION_ARGS) errmsg("wrong number of array subscripts"))); deconstruct_array(key_array, - TEXTOID, -1, false, 'i', + TEXTOID, -1, false, TYPALIGN_INT, &key_datums, &key_nulls, &key_count); /* see discussion in hstoreArrayToPairs() */ @@ -599,7 +599,7 @@ hstore_from_arrays(PG_FUNCTION_ARGS) errmsg("arrays must have same bounds"))); deconstruct_array(value_array, - TEXTOID, -1, false, 'i', + TEXTOID, -1, false, TYPALIGN_INT, &value_datums, &value_nulls, &value_count); Assert(key_count == value_count); @@ -689,7 +689,7 @@ hstore_from_array(PG_FUNCTION_ARGS) } deconstruct_array(in_array, - TEXTOID, -1, false, 'i', + TEXTOID, -1, false, TYPALIGN_INT, &in_datums, &in_nulls, &in_count); count = in_count / 2; diff --git a/contrib/hstore/hstore_op.c b/contrib/hstore/hstore_op.c index fb1bb0681cc..dd79d01cac3 100644 --- a/contrib/hstore/hstore_op.c +++ b/contrib/hstore/hstore_op.c @@ -81,7 +81,7 @@ hstoreArrayToPairs(ArrayType *a, int *npairs) j; deconstruct_array(a, - TEXTOID, -1, false, 'i', + TEXTOID, -1, false, TYPALIGN_INT, &key_datums, &key_nulls, &key_count); if (key_count == 0) @@ -583,7 +583,7 @@ hstore_slice_to_array(PG_FUNCTION_ARGS) int i; deconstruct_array(key_array, - TEXTOID, -1, false, 'i', + TEXTOID, -1, false, TYPALIGN_INT, &key_datums, &key_nulls, &key_count); if (key_count == 0) @@ -623,7 +623,7 @@ hstore_slice_to_array(PG_FUNCTION_ARGS) ARR_NDIM(key_array), ARR_DIMS(key_array), ARR_LBOUND(key_array), - TEXTOID, -1, false, 'i'); + TEXTOID, -1, false, TYPALIGN_INT); PG_RETURN_POINTER(aout); } @@ -720,7 +720,7 @@ hstore_akeys(PG_FUNCTION_ARGS) } a = construct_array(d, count, - TEXTOID, -1, false, 'i'); + TEXTOID, -1, false, TYPALIGN_INT); PG_RETURN_POINTER(a); } @@ -767,7 +767,7 @@ hstore_avals(PG_FUNCTION_ARGS) } a = construct_md_array(d, nulls, 1, &count, &lb, - TEXTOID, -1, false, 'i'); + TEXTOID, -1, false, TYPALIGN_INT); PG_RETURN_POINTER(a); } @@ -819,7 +819,7 @@ hstore_to_array_internal(HStore *hs, int ndims) return construct_md_array(out_datums, out_nulls, ndims, out_size, lb, - TEXTOID, -1, false, 'i'); + TEXTOID, -1, false, TYPALIGN_INT); } PG_FUNCTION_INFO_V1(hstore_to_array); diff --git a/contrib/pageinspect/btreefuncs.c b/contrib/pageinspect/btreefuncs.c index 2ddedef7141..dffb3e199ba 100644 --- a/contrib/pageinspect/btreefuncs.c +++ b/contrib/pageinspect/btreefuncs.c @@ -385,7 +385,7 @@ bt_page_print_tuples(FuncCallContext *fctx, struct user_args *uargs) nposting, TIDOID, sizeof(ItemPointerData), - false, 's')); + false, TYPALIGN_SHORT)); pfree(tids_datum); } else diff --git a/contrib/pageinspect/ginfuncs.c b/contrib/pageinspect/ginfuncs.c index 9b1d41c510e..7e2cafab74d 100644 --- a/contrib/pageinspect/ginfuncs.c +++ b/contrib/pageinspect/ginfuncs.c @@ -144,7 +144,8 @@ gin_page_opaque_info(PG_FUNCTION_ARGS) values[0] = Int64GetDatum(opaq->rightlink); values[1] = Int32GetDatum(opaq->maxoff); values[2] = PointerGetDatum(construct_array(flags, nflags, - TEXTOID, -1, false, 'i')); + TEXTOID, + -1, false, TYPALIGN_INT)); /* Build and return the result tuple. */ resultTuple = heap_form_tuple(tupdesc, values, nulls); @@ -247,7 +248,7 @@ gin_leafpage_items(PG_FUNCTION_ARGS) ndecoded, TIDOID, sizeof(ItemPointerData), - false, 's')); + false, TYPALIGN_SHORT)); pfree(tids_datum); pfree(tids); diff --git a/contrib/pageinspect/hashfuncs.c b/contrib/pageinspect/hashfuncs.c index effc80fbd3f..984ac331860 100644 --- a/contrib/pageinspect/hashfuncs.c +++ b/contrib/pageinspect/hashfuncs.c @@ -560,14 +560,18 @@ hash_metapage_info(PG_FUNCTION_ARGS) values[j++] = PointerGetDatum(construct_array(spares, HASH_MAX_SPLITPOINTS, INT8OID, - 8, FLOAT8PASSBYVAL, 'd')); + sizeof(int64), + FLOAT8PASSBYVAL, + TYPALIGN_DOUBLE)); for (i = 0; i < HASH_MAX_BITMAPS; i++) mapp[i] = Int64GetDatum((int64) metad->hashm_mapp[i]); values[j++] = PointerGetDatum(construct_array(mapp, HASH_MAX_BITMAPS, INT8OID, - 8, FLOAT8PASSBYVAL, 'd')); + sizeof(int64), + FLOAT8PASSBYVAL, + TYPALIGN_DOUBLE)); tuple = heap_form_tuple(tupleDesc, values, nulls); diff --git a/contrib/pageinspect/heapfuncs.c b/contrib/pageinspect/heapfuncs.c index 20b4d32429e..11a910184bf 100644 --- a/contrib/pageinspect/heapfuncs.c +++ b/contrib/pageinspect/heapfuncs.c @@ -589,7 +589,7 @@ heap_tuple_infomask_flags(PG_FUNCTION_ARGS) /* build value */ Assert(cnt <= bitcnt); - a = construct_array(flags, cnt, TEXTOID, -1, false, 'i'); + a = construct_array(flags, cnt, TEXTOID, -1, false, TYPALIGN_INT); values[0] = PointerGetDatum(a); /* @@ -611,7 +611,7 @@ heap_tuple_infomask_flags(PG_FUNCTION_ARGS) if (cnt == 0) a = construct_empty_array(TEXTOID); else - a = construct_array(flags, cnt, TEXTOID, -1, false, 'i'); + a = construct_array(flags, cnt, TEXTOID, -1, false, TYPALIGN_INT); pfree(flags); values[1] = PointerGetDatum(a); diff --git a/contrib/pg_trgm/trgm_op.c b/contrib/pg_trgm/trgm_op.c index 0670095c206..fb38135f7a3 100644 --- a/contrib/pg_trgm/trgm_op.c +++ b/contrib/pg_trgm/trgm_op.c @@ -980,7 +980,7 @@ show_trgm(PG_FUNCTION_ARGS) TEXTOID, -1, false, - 'i'); + TYPALIGN_INT); for (i = 0; i < ARRNELEM(trg); i++) pfree(DatumGetPointer(d[i])); diff --git a/contrib/pgcrypto/pgp-pgsql.c b/contrib/pgcrypto/pgp-pgsql.c index 8be895df80f..62a2f351e43 100644 --- a/contrib/pgcrypto/pgp-pgsql.c +++ b/contrib/pgcrypto/pgp-pgsql.c @@ -787,11 +787,11 @@ parse_key_value_arrays(ArrayType *key_array, ArrayType *val_array, return 0; deconstruct_array(key_array, - TEXTOID, -1, false, 'i', + TEXTOID, -1, false, TYPALIGN_INT, &key_datums, &key_nulls, &key_count); deconstruct_array(val_array, - TEXTOID, -1, false, 'i', + TEXTOID, -1, false, TYPALIGN_INT, &val_datums, &val_nulls, &val_count); if (key_count != val_count) |