mirror of
https://github.com/postgres/postgres.git
synced 2026-04-15 22:10:45 -04:00
Remove useless casts to (void *)
Many of them just seem to have been copied around for no real reason. Their presence causes (small) risks of hiding actual type mismatches or silently discarding qualifiers Discussion: https://www.postgresql.org/message-id/flat/461ea37c-8b58-43b4-9736-52884e862820@eisentraut.org
This commit is contained in:
parent
97525bc5c8
commit
7f798aca1d
158 changed files with 491 additions and 550 deletions
|
|
@ -719,7 +719,7 @@ bt_check_every_level(Relation rel, Relation heaprel, bool heapkeyspace,
|
||||||
RelationGetRelationName(state->heaprel));
|
RelationGetRelationName(state->heaprel));
|
||||||
|
|
||||||
table_index_build_scan(state->heaprel, state->rel, indexinfo, true, false,
|
table_index_build_scan(state->heaprel, state->rel, indexinfo, true, false,
|
||||||
bt_tuple_present_callback, (void *) state, scan);
|
bt_tuple_present_callback, state, scan);
|
||||||
|
|
||||||
ereport(DEBUG1,
|
ereport(DEBUG1,
|
||||||
(errmsg_internal("finished verifying presence of " INT64_FORMAT " tuples from table \"%s\" with bitset %.2f%% set",
|
(errmsg_internal("finished verifying presence of " INT64_FORMAT " tuples from table \"%s\" with bitset %.2f%% set",
|
||||||
|
|
|
||||||
|
|
@ -139,7 +139,7 @@ blbuild(Relation heap, Relation index, IndexInfo *indexInfo)
|
||||||
|
|
||||||
/* Do the heap scan */
|
/* Do the heap scan */
|
||||||
reltuples = table_index_build_scan(heap, index, indexInfo, true, true,
|
reltuples = table_index_build_scan(heap, index, indexInfo, true, true,
|
||||||
bloomBuildCallback, (void *) &buildstate,
|
bloomBuildCallback, &buildstate,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
/* Flush last page if needed (it will be, unless heap was empty) */
|
/* Flush last page if needed (it will be, unless heap was empty) */
|
||||||
|
|
|
||||||
|
|
@ -199,7 +199,7 @@ initBloomState(BloomState *state, Relation index)
|
||||||
|
|
||||||
UnlockReleaseBuffer(buffer);
|
UnlockReleaseBuffer(buffer);
|
||||||
|
|
||||||
index->rd_amcache = (void *) opts;
|
index->rd_amcache = opts;
|
||||||
}
|
}
|
||||||
|
|
||||||
memcpy(&state->opts, index->rd_amcache, sizeof(state->opts));
|
memcpy(&state->opts, index->rd_amcache, sizeof(state->opts));
|
||||||
|
|
|
||||||
|
|
@ -136,7 +136,7 @@ Datum
|
||||||
gbt_bit_consistent(PG_FUNCTION_ARGS)
|
gbt_bit_consistent(PG_FUNCTION_ARGS)
|
||||||
{
|
{
|
||||||
GISTENTRY *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
|
GISTENTRY *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
|
||||||
void *query = (void *) DatumGetByteaP(PG_GETARG_DATUM(1));
|
void *query = DatumGetByteaP(PG_GETARG_DATUM(1));
|
||||||
StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
|
StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
|
||||||
|
|
||||||
/* Oid subtype = PG_GETARG_OID(3); */
|
/* Oid subtype = PG_GETARG_OID(3); */
|
||||||
|
|
|
||||||
|
|
@ -120,7 +120,7 @@ gbt_bool_consistent(PG_FUNCTION_ARGS)
|
||||||
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
||||||
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
||||||
|
|
||||||
PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query, &strategy,
|
PG_RETURN_BOOL(gbt_num_consistent(&key, &query, &strategy,
|
||||||
GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
|
GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -132,7 +132,7 @@ gbt_bool_union(PG_FUNCTION_ARGS)
|
||||||
void *out = palloc(sizeof(boolKEY));
|
void *out = palloc(sizeof(boolKEY));
|
||||||
|
|
||||||
*(int *) PG_GETARG_POINTER(1) = sizeof(boolKEY);
|
*(int *) PG_GETARG_POINTER(1) = sizeof(boolKEY);
|
||||||
PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo, fcinfo->flinfo));
|
PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -104,7 +104,7 @@ Datum
|
||||||
gbt_bytea_consistent(PG_FUNCTION_ARGS)
|
gbt_bytea_consistent(PG_FUNCTION_ARGS)
|
||||||
{
|
{
|
||||||
GISTENTRY *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
|
GISTENTRY *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
|
||||||
void *query = (void *) DatumGetByteaP(PG_GETARG_DATUM(1));
|
void *query = DatumGetByteaP(PG_GETARG_DATUM(1));
|
||||||
StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
|
StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
|
||||||
|
|
||||||
/* Oid subtype = PG_GETARG_OID(3); */
|
/* Oid subtype = PG_GETARG_OID(3); */
|
||||||
|
|
|
||||||
|
|
@ -150,7 +150,7 @@ gbt_cash_consistent(PG_FUNCTION_ARGS)
|
||||||
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
||||||
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
||||||
|
|
||||||
PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query, &strategy,
|
PG_RETURN_BOOL(gbt_num_consistent(&key, &query, &strategy,
|
||||||
GIST_LEAF(entry), &tinfo,
|
GIST_LEAF(entry), &tinfo,
|
||||||
fcinfo->flinfo));
|
fcinfo->flinfo));
|
||||||
}
|
}
|
||||||
|
|
@ -169,7 +169,7 @@ gbt_cash_distance(PG_FUNCTION_ARGS)
|
||||||
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
||||||
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
||||||
|
|
||||||
PG_RETURN_FLOAT8(gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry),
|
PG_RETURN_FLOAT8(gbt_num_distance(&key, &query, GIST_LEAF(entry),
|
||||||
&tinfo, fcinfo->flinfo));
|
&tinfo, fcinfo->flinfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -181,7 +181,7 @@ gbt_cash_union(PG_FUNCTION_ARGS)
|
||||||
void *out = palloc(sizeof(cashKEY));
|
void *out = palloc(sizeof(cashKEY));
|
||||||
|
|
||||||
*(int *) PG_GETARG_POINTER(1) = sizeof(cashKEY);
|
*(int *) PG_GETARG_POINTER(1) = sizeof(cashKEY);
|
||||||
PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo, fcinfo->flinfo));
|
PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -167,7 +167,7 @@ gbt_date_consistent(PG_FUNCTION_ARGS)
|
||||||
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
||||||
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
||||||
|
|
||||||
PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query, &strategy,
|
PG_RETURN_BOOL(gbt_num_consistent(&key, &query, &strategy,
|
||||||
GIST_LEAF(entry), &tinfo,
|
GIST_LEAF(entry), &tinfo,
|
||||||
fcinfo->flinfo));
|
fcinfo->flinfo));
|
||||||
}
|
}
|
||||||
|
|
@ -186,7 +186,7 @@ gbt_date_distance(PG_FUNCTION_ARGS)
|
||||||
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
||||||
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
||||||
|
|
||||||
PG_RETURN_FLOAT8(gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry),
|
PG_RETURN_FLOAT8(gbt_num_distance(&key, &query, GIST_LEAF(entry),
|
||||||
&tinfo, fcinfo->flinfo));
|
&tinfo, fcinfo->flinfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -198,7 +198,7 @@ gbt_date_union(PG_FUNCTION_ARGS)
|
||||||
void *out = palloc(sizeof(dateKEY));
|
void *out = palloc(sizeof(dateKEY));
|
||||||
|
|
||||||
*(int *) PG_GETARG_POINTER(1) = sizeof(dateKEY);
|
*(int *) PG_GETARG_POINTER(1) = sizeof(dateKEY);
|
||||||
PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo, fcinfo->flinfo));
|
PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -137,7 +137,7 @@ gbt_enum_consistent(PG_FUNCTION_ARGS)
|
||||||
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
||||||
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
||||||
|
|
||||||
PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query, &strategy,
|
PG_RETURN_BOOL(gbt_num_consistent(&key, &query, &strategy,
|
||||||
GIST_LEAF(entry), &tinfo,
|
GIST_LEAF(entry), &tinfo,
|
||||||
fcinfo->flinfo));
|
fcinfo->flinfo));
|
||||||
}
|
}
|
||||||
|
|
@ -149,7 +149,7 @@ gbt_enum_union(PG_FUNCTION_ARGS)
|
||||||
void *out = palloc(sizeof(oidKEY));
|
void *out = palloc(sizeof(oidKEY));
|
||||||
|
|
||||||
*(int *) PG_GETARG_POINTER(1) = sizeof(oidKEY);
|
*(int *) PG_GETARG_POINTER(1) = sizeof(oidKEY);
|
||||||
PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo, fcinfo->flinfo));
|
PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -145,7 +145,7 @@ gbt_float4_consistent(PG_FUNCTION_ARGS)
|
||||||
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
||||||
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
||||||
|
|
||||||
PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query, &strategy,
|
PG_RETURN_BOOL(gbt_num_consistent(&key, &query, &strategy,
|
||||||
GIST_LEAF(entry), &tinfo,
|
GIST_LEAF(entry), &tinfo,
|
||||||
fcinfo->flinfo));
|
fcinfo->flinfo));
|
||||||
}
|
}
|
||||||
|
|
@ -164,7 +164,7 @@ gbt_float4_distance(PG_FUNCTION_ARGS)
|
||||||
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
||||||
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
||||||
|
|
||||||
PG_RETURN_FLOAT8(gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry),
|
PG_RETURN_FLOAT8(gbt_num_distance(&key, &query, GIST_LEAF(entry),
|
||||||
&tinfo, fcinfo->flinfo));
|
&tinfo, fcinfo->flinfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -176,7 +176,7 @@ gbt_float4_union(PG_FUNCTION_ARGS)
|
||||||
void *out = palloc(sizeof(float4KEY));
|
void *out = palloc(sizeof(float4KEY));
|
||||||
|
|
||||||
*(int *) PG_GETARG_POINTER(1) = sizeof(float4KEY);
|
*(int *) PG_GETARG_POINTER(1) = sizeof(float4KEY);
|
||||||
PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo, fcinfo->flinfo));
|
PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -152,7 +152,7 @@ gbt_float8_consistent(PG_FUNCTION_ARGS)
|
||||||
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
||||||
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
||||||
|
|
||||||
PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query, &strategy,
|
PG_RETURN_BOOL(gbt_num_consistent(&key, &query, &strategy,
|
||||||
GIST_LEAF(entry), &tinfo,
|
GIST_LEAF(entry), &tinfo,
|
||||||
fcinfo->flinfo));
|
fcinfo->flinfo));
|
||||||
}
|
}
|
||||||
|
|
@ -171,7 +171,7 @@ gbt_float8_distance(PG_FUNCTION_ARGS)
|
||||||
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
||||||
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
||||||
|
|
||||||
PG_RETURN_FLOAT8(gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry),
|
PG_RETURN_FLOAT8(gbt_num_distance(&key, &query, GIST_LEAF(entry),
|
||||||
&tinfo, fcinfo->flinfo));
|
&tinfo, fcinfo->flinfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -183,7 +183,7 @@ gbt_float8_union(PG_FUNCTION_ARGS)
|
||||||
void *out = palloc(sizeof(float8KEY));
|
void *out = palloc(sizeof(float8KEY));
|
||||||
|
|
||||||
*(int *) PG_GETARG_POINTER(1) = sizeof(float8KEY);
|
*(int *) PG_GETARG_POINTER(1) = sizeof(float8KEY);
|
||||||
PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo, fcinfo->flinfo));
|
PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -138,7 +138,7 @@ gbt_inet_consistent(PG_FUNCTION_ARGS)
|
||||||
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
||||||
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
||||||
|
|
||||||
PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query,
|
PG_RETURN_BOOL(gbt_num_consistent(&key, &query,
|
||||||
&strategy, GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
|
&strategy, GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -150,7 +150,7 @@ gbt_inet_union(PG_FUNCTION_ARGS)
|
||||||
void *out = palloc(sizeof(inetKEY));
|
void *out = palloc(sizeof(inetKEY));
|
||||||
|
|
||||||
*(int *) PG_GETARG_POINTER(1) = sizeof(inetKEY);
|
*(int *) PG_GETARG_POINTER(1) = sizeof(inetKEY);
|
||||||
PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo, fcinfo->flinfo));
|
PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -150,7 +150,7 @@ gbt_int2_consistent(PG_FUNCTION_ARGS)
|
||||||
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
||||||
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
||||||
|
|
||||||
PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query, &strategy,
|
PG_RETURN_BOOL(gbt_num_consistent(&key, &query, &strategy,
|
||||||
GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
|
GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -168,7 +168,7 @@ gbt_int2_distance(PG_FUNCTION_ARGS)
|
||||||
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
||||||
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
||||||
|
|
||||||
PG_RETURN_FLOAT8(gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry),
|
PG_RETURN_FLOAT8(gbt_num_distance(&key, &query, GIST_LEAF(entry),
|
||||||
&tinfo, fcinfo->flinfo));
|
&tinfo, fcinfo->flinfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -180,7 +180,7 @@ gbt_int2_union(PG_FUNCTION_ARGS)
|
||||||
void *out = palloc(sizeof(int16KEY));
|
void *out = palloc(sizeof(int16KEY));
|
||||||
|
|
||||||
*(int *) PG_GETARG_POINTER(1) = sizeof(int16KEY);
|
*(int *) PG_GETARG_POINTER(1) = sizeof(int16KEY);
|
||||||
PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo, fcinfo->flinfo));
|
PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -151,7 +151,7 @@ gbt_int4_consistent(PG_FUNCTION_ARGS)
|
||||||
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
||||||
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
||||||
|
|
||||||
PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query, &strategy,
|
PG_RETURN_BOOL(gbt_num_consistent(&key, &query, &strategy,
|
||||||
GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
|
GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -169,7 +169,7 @@ gbt_int4_distance(PG_FUNCTION_ARGS)
|
||||||
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
||||||
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
||||||
|
|
||||||
PG_RETURN_FLOAT8(gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry),
|
PG_RETURN_FLOAT8(gbt_num_distance(&key, &query, GIST_LEAF(entry),
|
||||||
&tinfo, fcinfo->flinfo));
|
&tinfo, fcinfo->flinfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -181,7 +181,7 @@ gbt_int4_union(PG_FUNCTION_ARGS)
|
||||||
void *out = palloc(sizeof(int32KEY));
|
void *out = palloc(sizeof(int32KEY));
|
||||||
|
|
||||||
*(int *) PG_GETARG_POINTER(1) = sizeof(int32KEY);
|
*(int *) PG_GETARG_POINTER(1) = sizeof(int32KEY);
|
||||||
PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo, fcinfo->flinfo));
|
PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -151,7 +151,7 @@ gbt_int8_consistent(PG_FUNCTION_ARGS)
|
||||||
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
||||||
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
||||||
|
|
||||||
PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query, &strategy,
|
PG_RETURN_BOOL(gbt_num_consistent(&key, &query, &strategy,
|
||||||
GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
|
GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -169,7 +169,7 @@ gbt_int8_distance(PG_FUNCTION_ARGS)
|
||||||
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
||||||
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
||||||
|
|
||||||
PG_RETURN_FLOAT8(gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry),
|
PG_RETURN_FLOAT8(gbt_num_distance(&key, &query, GIST_LEAF(entry),
|
||||||
&tinfo, fcinfo->flinfo));
|
&tinfo, fcinfo->flinfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -181,7 +181,7 @@ gbt_int8_union(PG_FUNCTION_ARGS)
|
||||||
void *out = palloc(sizeof(int64KEY));
|
void *out = palloc(sizeof(int64KEY));
|
||||||
|
|
||||||
*(int *) PG_GETARG_POINTER(1) = sizeof(int64KEY);
|
*(int *) PG_GETARG_POINTER(1) = sizeof(int64KEY);
|
||||||
PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo, fcinfo->flinfo));
|
PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -224,7 +224,7 @@ gbt_intv_consistent(PG_FUNCTION_ARGS)
|
||||||
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
||||||
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
||||||
|
|
||||||
PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) query, &strategy,
|
PG_RETURN_BOOL(gbt_num_consistent(&key, query, &strategy,
|
||||||
GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
|
GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -242,7 +242,7 @@ gbt_intv_distance(PG_FUNCTION_ARGS)
|
||||||
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
||||||
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
||||||
|
|
||||||
PG_RETURN_FLOAT8(gbt_num_distance(&key, (void *) query, GIST_LEAF(entry),
|
PG_RETURN_FLOAT8(gbt_num_distance(&key, query, GIST_LEAF(entry),
|
||||||
&tinfo, fcinfo->flinfo));
|
&tinfo, fcinfo->flinfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -254,7 +254,7 @@ gbt_intv_union(PG_FUNCTION_ARGS)
|
||||||
void *out = palloc(sizeof(intvKEY));
|
void *out = palloc(sizeof(intvKEY));
|
||||||
|
|
||||||
*(int *) PG_GETARG_POINTER(1) = sizeof(intvKEY);
|
*(int *) PG_GETARG_POINTER(1) = sizeof(intvKEY);
|
||||||
PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo, fcinfo->flinfo));
|
PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -141,7 +141,7 @@ gbt_macad_consistent(PG_FUNCTION_ARGS)
|
||||||
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
||||||
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
||||||
|
|
||||||
PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) query, &strategy,
|
PG_RETURN_BOOL(gbt_num_consistent(&key, query, &strategy,
|
||||||
GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
|
GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -153,7 +153,7 @@ gbt_macad_union(PG_FUNCTION_ARGS)
|
||||||
void *out = palloc0(sizeof(macKEY));
|
void *out = palloc0(sizeof(macKEY));
|
||||||
|
|
||||||
*(int *) PG_GETARG_POINTER(1) = sizeof(macKEY);
|
*(int *) PG_GETARG_POINTER(1) = sizeof(macKEY);
|
||||||
PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo, fcinfo->flinfo));
|
PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -141,7 +141,7 @@ gbt_macad8_consistent(PG_FUNCTION_ARGS)
|
||||||
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
||||||
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
||||||
|
|
||||||
PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) query, &strategy,
|
PG_RETURN_BOOL(gbt_num_consistent(&key, query, &strategy,
|
||||||
GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
|
GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -153,7 +153,7 @@ gbt_macad8_union(PG_FUNCTION_ARGS)
|
||||||
void *out = palloc0(sizeof(mac8KEY));
|
void *out = palloc0(sizeof(mac8KEY));
|
||||||
|
|
||||||
*(int *) PG_GETARG_POINTER(1) = sizeof(mac8KEY);
|
*(int *) PG_GETARG_POINTER(1) = sizeof(mac8KEY);
|
||||||
PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo, fcinfo->flinfo));
|
PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -108,7 +108,7 @@ Datum
|
||||||
gbt_numeric_consistent(PG_FUNCTION_ARGS)
|
gbt_numeric_consistent(PG_FUNCTION_ARGS)
|
||||||
{
|
{
|
||||||
GISTENTRY *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
|
GISTENTRY *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
|
||||||
void *query = (void *) DatumGetNumeric(PG_GETARG_DATUM(1));
|
void *query = DatumGetNumeric(PG_GETARG_DATUM(1));
|
||||||
StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
|
StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
|
||||||
|
|
||||||
/* Oid subtype = PG_GETARG_OID(3); */
|
/* Oid subtype = PG_GETARG_OID(3); */
|
||||||
|
|
|
||||||
|
|
@ -151,7 +151,7 @@ gbt_oid_consistent(PG_FUNCTION_ARGS)
|
||||||
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
||||||
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
||||||
|
|
||||||
PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query, &strategy,
|
PG_RETURN_BOOL(gbt_num_consistent(&key, &query, &strategy,
|
||||||
GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
|
GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -169,7 +169,7 @@ gbt_oid_distance(PG_FUNCTION_ARGS)
|
||||||
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
||||||
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
||||||
|
|
||||||
PG_RETURN_FLOAT8(gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry),
|
PG_RETURN_FLOAT8(gbt_num_distance(&key, &query, GIST_LEAF(entry),
|
||||||
&tinfo, fcinfo->flinfo));
|
&tinfo, fcinfo->flinfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -181,7 +181,7 @@ gbt_oid_union(PG_FUNCTION_ARGS)
|
||||||
void *out = palloc(sizeof(oidKEY));
|
void *out = palloc(sizeof(oidKEY));
|
||||||
|
|
||||||
*(int *) PG_GETARG_POINTER(1) = sizeof(oidKEY);
|
*(int *) PG_GETARG_POINTER(1) = sizeof(oidKEY);
|
||||||
PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo, fcinfo->flinfo));
|
PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -193,7 +193,7 @@ Datum
|
||||||
gbt_text_consistent(PG_FUNCTION_ARGS)
|
gbt_text_consistent(PG_FUNCTION_ARGS)
|
||||||
{
|
{
|
||||||
GISTENTRY *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
|
GISTENTRY *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
|
||||||
void *query = (void *) DatumGetTextP(PG_GETARG_DATUM(1));
|
void *query = DatumGetTextP(PG_GETARG_DATUM(1));
|
||||||
StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
|
StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
|
||||||
|
|
||||||
/* Oid subtype = PG_GETARG_OID(3); */
|
/* Oid subtype = PG_GETARG_OID(3); */
|
||||||
|
|
@ -221,7 +221,7 @@ Datum
|
||||||
gbt_bpchar_consistent(PG_FUNCTION_ARGS)
|
gbt_bpchar_consistent(PG_FUNCTION_ARGS)
|
||||||
{
|
{
|
||||||
GISTENTRY *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
|
GISTENTRY *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
|
||||||
void *query = (void *) DatumGetTextP(PG_GETARG_DATUM(1));
|
void *query = DatumGetTextP(PG_GETARG_DATUM(1));
|
||||||
StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
|
StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
|
||||||
|
|
||||||
/* Oid subtype = PG_GETARG_OID(3); */
|
/* Oid subtype = PG_GETARG_OID(3); */
|
||||||
|
|
|
||||||
|
|
@ -216,7 +216,7 @@ gbt_time_consistent(PG_FUNCTION_ARGS)
|
||||||
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
||||||
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
||||||
|
|
||||||
PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query, &strategy,
|
PG_RETURN_BOOL(gbt_num_consistent(&key, &query, &strategy,
|
||||||
GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
|
GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -233,7 +233,7 @@ gbt_time_distance(PG_FUNCTION_ARGS)
|
||||||
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
||||||
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
||||||
|
|
||||||
PG_RETURN_FLOAT8(gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry),
|
PG_RETURN_FLOAT8(gbt_num_distance(&key, &query, GIST_LEAF(entry),
|
||||||
&tinfo, fcinfo->flinfo));
|
&tinfo, fcinfo->flinfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -258,7 +258,7 @@ gbt_timetz_consistent(PG_FUNCTION_ARGS)
|
||||||
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
||||||
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
||||||
|
|
||||||
PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &qqq, &strategy,
|
PG_RETURN_BOOL(gbt_num_consistent(&key, &qqq, &strategy,
|
||||||
GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
|
GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -270,7 +270,7 @@ gbt_time_union(PG_FUNCTION_ARGS)
|
||||||
void *out = palloc(sizeof(timeKEY));
|
void *out = palloc(sizeof(timeKEY));
|
||||||
|
|
||||||
*(int *) PG_GETARG_POINTER(1) = sizeof(timeKEY);
|
*(int *) PG_GETARG_POINTER(1) = sizeof(timeKEY);
|
||||||
PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo, fcinfo->flinfo));
|
PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -265,7 +265,7 @@ gbt_ts_consistent(PG_FUNCTION_ARGS)
|
||||||
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
||||||
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
||||||
|
|
||||||
PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query, &strategy,
|
PG_RETURN_BOOL(gbt_num_consistent(&key, &query, &strategy,
|
||||||
GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
|
GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -282,7 +282,7 @@ gbt_ts_distance(PG_FUNCTION_ARGS)
|
||||||
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
||||||
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
||||||
|
|
||||||
PG_RETURN_FLOAT8(gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry),
|
PG_RETURN_FLOAT8(gbt_num_distance(&key, &query, GIST_LEAF(entry),
|
||||||
&tinfo, fcinfo->flinfo));
|
&tinfo, fcinfo->flinfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -306,7 +306,7 @@ gbt_tstz_consistent(PG_FUNCTION_ARGS)
|
||||||
key.upper = (GBT_NUMKEY *) &kkk[MAXALIGN(tinfo.size)];
|
key.upper = (GBT_NUMKEY *) &kkk[MAXALIGN(tinfo.size)];
|
||||||
qqq = tstz_to_ts_gmt(query);
|
qqq = tstz_to_ts_gmt(query);
|
||||||
|
|
||||||
PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &qqq, &strategy,
|
PG_RETURN_BOOL(gbt_num_consistent(&key, &qqq, &strategy,
|
||||||
GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
|
GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -325,7 +325,7 @@ gbt_tstz_distance(PG_FUNCTION_ARGS)
|
||||||
key.upper = (GBT_NUMKEY *) &kkk[MAXALIGN(tinfo.size)];
|
key.upper = (GBT_NUMKEY *) &kkk[MAXALIGN(tinfo.size)];
|
||||||
qqq = tstz_to_ts_gmt(query);
|
qqq = tstz_to_ts_gmt(query);
|
||||||
|
|
||||||
PG_RETURN_FLOAT8(gbt_num_distance(&key, (void *) &qqq, GIST_LEAF(entry),
|
PG_RETURN_FLOAT8(gbt_num_distance(&key, &qqq, GIST_LEAF(entry),
|
||||||
&tinfo, fcinfo->flinfo));
|
&tinfo, fcinfo->flinfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -337,7 +337,7 @@ gbt_ts_union(PG_FUNCTION_ARGS)
|
||||||
void *out = palloc(sizeof(tsKEY));
|
void *out = palloc(sizeof(tsKEY));
|
||||||
|
|
||||||
*(int *) PG_GETARG_POINTER(1) = sizeof(tsKEY);
|
*(int *) PG_GETARG_POINTER(1) = sizeof(tsKEY);
|
||||||
PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo, fcinfo->flinfo));
|
PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -148,7 +148,7 @@ gbt_uuid_consistent(PG_FUNCTION_ARGS)
|
||||||
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
||||||
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
||||||
|
|
||||||
PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) query, &strategy,
|
PG_RETURN_BOOL(gbt_num_consistent(&key, query, &strategy,
|
||||||
GIST_LEAF(entry), &tinfo,
|
GIST_LEAF(entry), &tinfo,
|
||||||
fcinfo->flinfo));
|
fcinfo->flinfo));
|
||||||
}
|
}
|
||||||
|
|
@ -160,7 +160,7 @@ gbt_uuid_union(PG_FUNCTION_ARGS)
|
||||||
void *out = palloc(sizeof(uuidKEY));
|
void *out = palloc(sizeof(uuidKEY));
|
||||||
|
|
||||||
*(int *) PG_GETARG_POINTER(1) = sizeof(uuidKEY);
|
*(int *) PG_GETARG_POINTER(1) = sizeof(uuidKEY);
|
||||||
PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo, fcinfo->flinfo));
|
PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -531,7 +531,7 @@ fileGetForeignRelSize(PlannerInfo *root,
|
||||||
&fdw_private->filename,
|
&fdw_private->filename,
|
||||||
&fdw_private->is_program,
|
&fdw_private->is_program,
|
||||||
&fdw_private->options);
|
&fdw_private->options);
|
||||||
baserel->fdw_private = (void *) fdw_private;
|
baserel->fdw_private = fdw_private;
|
||||||
|
|
||||||
/* Estimate relation size */
|
/* Estimate relation size */
|
||||||
estimate_size(root, baserel, fdw_private);
|
estimate_size(root, baserel, fdw_private);
|
||||||
|
|
@ -713,7 +713,7 @@ fileBeginForeignScan(ForeignScanState *node, int eflags)
|
||||||
festate->options = options;
|
festate->options = options;
|
||||||
festate->cstate = cstate;
|
festate->cstate = cstate;
|
||||||
|
|
||||||
node->fdw_state = (void *) festate;
|
node->fdw_state = festate;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -734,7 +734,7 @@ fileIterateForeignScan(ForeignScanState *node)
|
||||||
|
|
||||||
/* Set up callback to identify error line number. */
|
/* Set up callback to identify error line number. */
|
||||||
errcallback.callback = CopyFromErrorCallback;
|
errcallback.callback = CopyFromErrorCallback;
|
||||||
errcallback.arg = (void *) cstate;
|
errcallback.arg = cstate;
|
||||||
errcallback.previous = error_context_stack;
|
errcallback.previous = error_context_stack;
|
||||||
error_context_stack = &errcallback;
|
error_context_stack = &errcallback;
|
||||||
|
|
||||||
|
|
@ -1228,7 +1228,7 @@ file_acquire_sample_rows(Relation onerel, int elevel,
|
||||||
|
|
||||||
/* Set up callback to identify error line number. */
|
/* Set up callback to identify error line number. */
|
||||||
errcallback.callback = CopyFromErrorCallback;
|
errcallback.callback = CopyFromErrorCallback;
|
||||||
errcallback.arg = (void *) cstate;
|
errcallback.arg = cstate;
|
||||||
errcallback.previous = error_context_stack;
|
errcallback.previous = error_context_stack;
|
||||||
error_context_stack = &errcallback;
|
error_context_stack = &errcallback;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -858,7 +858,7 @@ setup_firstcall(FuncCallContext *funcctx, HStore *hs,
|
||||||
st = (HStore *) palloc(VARSIZE(hs));
|
st = (HStore *) palloc(VARSIZE(hs));
|
||||||
memcpy(st, hs, VARSIZE(hs));
|
memcpy(st, hs, VARSIZE(hs));
|
||||||
|
|
||||||
funcctx->user_fctx = (void *) st;
|
funcctx->user_fctx = st;
|
||||||
|
|
||||||
if (fcinfo)
|
if (fcinfo)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -298,7 +298,7 @@ bool
|
||||||
signconsistent(QUERYTYPE *query, BITVECP sign, int siglen, bool calcnot)
|
signconsistent(QUERYTYPE *query, BITVECP sign, int siglen, bool calcnot)
|
||||||
{
|
{
|
||||||
return execute(GETQUERY(query) + query->size - 1,
|
return execute(GETQUERY(query) + query->size - 1,
|
||||||
(void *) sign, (void *) (intptr_t) siglen, calcnot,
|
sign, (void *) (intptr_t) siglen, calcnot,
|
||||||
checkcondition_bit);
|
checkcondition_bit);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -312,7 +312,7 @@ execconsistent(QUERYTYPE *query, ArrayType *array, bool calcnot)
|
||||||
chkval.arrb = ARRPTR(array);
|
chkval.arrb = ARRPTR(array);
|
||||||
chkval.arre = chkval.arrb + ARRNELEMS(array);
|
chkval.arre = chkval.arrb + ARRNELEMS(array);
|
||||||
return execute(GETQUERY(query) + query->size - 1,
|
return execute(GETQUERY(query) + query->size - 1,
|
||||||
(void *) &chkval, NULL, calcnot,
|
&chkval, NULL, calcnot,
|
||||||
checkcondition_arr);
|
checkcondition_arr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -354,7 +354,7 @@ gin_bool_consistent(QUERYTYPE *query, bool *check)
|
||||||
}
|
}
|
||||||
|
|
||||||
return execute(GETQUERY(query) + query->size - 1,
|
return execute(GETQUERY(query) + query->size - 1,
|
||||||
(void *) &gcv, NULL, true,
|
&gcv, NULL, true,
|
||||||
checkcondition_gin);
|
checkcondition_gin);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -506,7 +506,7 @@ Datum
|
||||||
_ltree_consistent(PG_FUNCTION_ARGS)
|
_ltree_consistent(PG_FUNCTION_ARGS)
|
||||||
{
|
{
|
||||||
GISTENTRY *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
|
GISTENTRY *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
|
||||||
void *query = (void *) PG_DETOAST_DATUM(PG_GETARG_DATUM(1));
|
void *query = PG_DETOAST_DATUM(PG_GETARG_DATUM(1));
|
||||||
StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
|
StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
|
||||||
|
|
||||||
/* Oid subtype = PG_GETARG_OID(3); */
|
/* Oid subtype = PG_GETARG_OID(3); */
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ _ltree_isparent(PG_FUNCTION_ARGS)
|
||||||
{
|
{
|
||||||
ArrayType *la = PG_GETARG_ARRAYTYPE_P(0);
|
ArrayType *la = PG_GETARG_ARRAYTYPE_P(0);
|
||||||
ltree *query = PG_GETARG_LTREE_P(1);
|
ltree *query = PG_GETARG_LTREE_P(1);
|
||||||
bool res = array_iterator(la, ltree_isparent, (void *) query, NULL);
|
bool res = array_iterator(la, ltree_isparent, query, NULL);
|
||||||
|
|
||||||
PG_FREE_IF_COPY(la, 0);
|
PG_FREE_IF_COPY(la, 0);
|
||||||
PG_FREE_IF_COPY(query, 1);
|
PG_FREE_IF_COPY(query, 1);
|
||||||
|
|
@ -94,7 +94,7 @@ _ltree_risparent(PG_FUNCTION_ARGS)
|
||||||
{
|
{
|
||||||
ArrayType *la = PG_GETARG_ARRAYTYPE_P(0);
|
ArrayType *la = PG_GETARG_ARRAYTYPE_P(0);
|
||||||
ltree *query = PG_GETARG_LTREE_P(1);
|
ltree *query = PG_GETARG_LTREE_P(1);
|
||||||
bool res = array_iterator(la, ltree_risparent, (void *) query, NULL);
|
bool res = array_iterator(la, ltree_risparent, query, NULL);
|
||||||
|
|
||||||
PG_FREE_IF_COPY(la, 0);
|
PG_FREE_IF_COPY(la, 0);
|
||||||
PG_FREE_IF_COPY(query, 1);
|
PG_FREE_IF_COPY(query, 1);
|
||||||
|
|
@ -115,7 +115,7 @@ _ltq_regex(PG_FUNCTION_ARGS)
|
||||||
{
|
{
|
||||||
ArrayType *la = PG_GETARG_ARRAYTYPE_P(0);
|
ArrayType *la = PG_GETARG_ARRAYTYPE_P(0);
|
||||||
lquery *query = PG_GETARG_LQUERY_P(1);
|
lquery *query = PG_GETARG_LQUERY_P(1);
|
||||||
bool res = array_iterator(la, ltq_regex, (void *) query, NULL);
|
bool res = array_iterator(la, ltq_regex, query, NULL);
|
||||||
|
|
||||||
PG_FREE_IF_COPY(la, 0);
|
PG_FREE_IF_COPY(la, 0);
|
||||||
PG_FREE_IF_COPY(query, 1);
|
PG_FREE_IF_COPY(query, 1);
|
||||||
|
|
@ -151,7 +151,7 @@ _lt_q_regex(PG_FUNCTION_ARGS)
|
||||||
|
|
||||||
while (num > 0)
|
while (num > 0)
|
||||||
{
|
{
|
||||||
if (array_iterator(_tree, ltq_regex, (void *) query, NULL))
|
if (array_iterator(_tree, ltq_regex, query, NULL))
|
||||||
{
|
{
|
||||||
res = true;
|
res = true;
|
||||||
break;
|
break;
|
||||||
|
|
@ -180,7 +180,7 @@ _ltxtq_exec(PG_FUNCTION_ARGS)
|
||||||
{
|
{
|
||||||
ArrayType *la = PG_GETARG_ARRAYTYPE_P(0);
|
ArrayType *la = PG_GETARG_ARRAYTYPE_P(0);
|
||||||
ltxtquery *query = PG_GETARG_LTXTQUERY_P(1);
|
ltxtquery *query = PG_GETARG_LTXTQUERY_P(1);
|
||||||
bool res = array_iterator(la, ltxtq_exec, (void *) query, NULL);
|
bool res = array_iterator(la, ltxtq_exec, query, NULL);
|
||||||
|
|
||||||
PG_FREE_IF_COPY(la, 0);
|
PG_FREE_IF_COPY(la, 0);
|
||||||
PG_FREE_IF_COPY(query, 1);
|
PG_FREE_IF_COPY(query, 1);
|
||||||
|
|
@ -205,7 +205,7 @@ _ltree_extract_isparent(PG_FUNCTION_ARGS)
|
||||||
ltree *found,
|
ltree *found,
|
||||||
*item;
|
*item;
|
||||||
|
|
||||||
if (!array_iterator(la, ltree_isparent, (void *) query, &found))
|
if (!array_iterator(la, ltree_isparent, query, &found))
|
||||||
{
|
{
|
||||||
PG_FREE_IF_COPY(la, 0);
|
PG_FREE_IF_COPY(la, 0);
|
||||||
PG_FREE_IF_COPY(query, 1);
|
PG_FREE_IF_COPY(query, 1);
|
||||||
|
|
@ -228,7 +228,7 @@ _ltree_extract_risparent(PG_FUNCTION_ARGS)
|
||||||
ltree *found,
|
ltree *found,
|
||||||
*item;
|
*item;
|
||||||
|
|
||||||
if (!array_iterator(la, ltree_risparent, (void *) query, &found))
|
if (!array_iterator(la, ltree_risparent, query, &found))
|
||||||
{
|
{
|
||||||
PG_FREE_IF_COPY(la, 0);
|
PG_FREE_IF_COPY(la, 0);
|
||||||
PG_FREE_IF_COPY(query, 1);
|
PG_FREE_IF_COPY(query, 1);
|
||||||
|
|
@ -251,7 +251,7 @@ _ltq_extract_regex(PG_FUNCTION_ARGS)
|
||||||
ltree *found,
|
ltree *found,
|
||||||
*item;
|
*item;
|
||||||
|
|
||||||
if (!array_iterator(la, ltq_regex, (void *) query, &found))
|
if (!array_iterator(la, ltq_regex, query, &found))
|
||||||
{
|
{
|
||||||
PG_FREE_IF_COPY(la, 0);
|
PG_FREE_IF_COPY(la, 0);
|
||||||
PG_FREE_IF_COPY(query, 1);
|
PG_FREE_IF_COPY(query, 1);
|
||||||
|
|
@ -274,7 +274,7 @@ _ltxtq_extract_exec(PG_FUNCTION_ARGS)
|
||||||
ltree *found,
|
ltree *found,
|
||||||
*item;
|
*item;
|
||||||
|
|
||||||
if (!array_iterator(la, ltxtq_exec, (void *) query, &found))
|
if (!array_iterator(la, ltxtq_exec, query, &found))
|
||||||
{
|
{
|
||||||
PG_FREE_IF_COPY(la, 0);
|
PG_FREE_IF_COPY(la, 0);
|
||||||
PG_FREE_IF_COPY(query, 1);
|
PG_FREE_IF_COPY(query, 1);
|
||||||
|
|
|
||||||
|
|
@ -299,7 +299,7 @@ gtrgm_consistent(PG_FUNCTION_ARGS)
|
||||||
|
|
||||||
if (cache)
|
if (cache)
|
||||||
pfree(cache);
|
pfree(cache);
|
||||||
fcinfo->flinfo->fn_extra = (void *) newcache;
|
fcinfo->flinfo->fn_extra = newcache;
|
||||||
cache = newcache;
|
cache = newcache;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -203,7 +203,7 @@ px_find_digest(const char *name, PX_MD **res)
|
||||||
h->update = digest_update;
|
h->update = digest_update;
|
||||||
h->finish = digest_finish;
|
h->finish = digest_finish;
|
||||||
h->free = digest_free;
|
h->free = digest_free;
|
||||||
h->p.ptr = (void *) digest;
|
h->p.ptr = digest;
|
||||||
|
|
||||||
*res = h;
|
*res = h;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
|
|
@ -630,7 +630,7 @@ postgresGetForeignRelSize(PlannerInfo *root,
|
||||||
* functions.
|
* functions.
|
||||||
*/
|
*/
|
||||||
fpinfo = (PgFdwRelationInfo *) palloc0(sizeof(PgFdwRelationInfo));
|
fpinfo = (PgFdwRelationInfo *) palloc0(sizeof(PgFdwRelationInfo));
|
||||||
baserel->fdw_private = (void *) fpinfo;
|
baserel->fdw_private = fpinfo;
|
||||||
|
|
||||||
/* Base foreign tables need to be pushed down always. */
|
/* Base foreign tables need to be pushed down always. */
|
||||||
fpinfo->pushdown_safe = true;
|
fpinfo->pushdown_safe = true;
|
||||||
|
|
@ -1132,7 +1132,7 @@ postgresGetForeignPaths(PlannerInfo *root,
|
||||||
clauses = generate_implied_equalities_for_column(root,
|
clauses = generate_implied_equalities_for_column(root,
|
||||||
baserel,
|
baserel,
|
||||||
ec_member_matches_foreign,
|
ec_member_matches_foreign,
|
||||||
(void *) &arg,
|
&arg,
|
||||||
baserel->lateral_referencers);
|
baserel->lateral_referencers);
|
||||||
|
|
||||||
/* Done if there are no more expressions in the foreign rel */
|
/* Done if there are no more expressions in the foreign rel */
|
||||||
|
|
@ -1514,7 +1514,7 @@ postgresBeginForeignScan(ForeignScanState *node, int eflags)
|
||||||
* We'll save private state in node->fdw_state.
|
* We'll save private state in node->fdw_state.
|
||||||
*/
|
*/
|
||||||
fsstate = (PgFdwScanState *) palloc0(sizeof(PgFdwScanState));
|
fsstate = (PgFdwScanState *) palloc0(sizeof(PgFdwScanState));
|
||||||
node->fdw_state = (void *) fsstate;
|
node->fdw_state = fsstate;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Identify which user to do the remote access as. This should match what
|
* Identify which user to do the remote access as. This should match what
|
||||||
|
|
@ -2664,7 +2664,7 @@ postgresBeginDirectModify(ForeignScanState *node, int eflags)
|
||||||
* We'll save private state in node->fdw_state.
|
* We'll save private state in node->fdw_state.
|
||||||
*/
|
*/
|
||||||
dmstate = (PgFdwDirectModifyState *) palloc0(sizeof(PgFdwDirectModifyState));
|
dmstate = (PgFdwDirectModifyState *) palloc0(sizeof(PgFdwDirectModifyState));
|
||||||
node->fdw_state = (void *) dmstate;
|
node->fdw_state = dmstate;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Identify which user to do the remote access as. This should match what
|
* Identify which user to do the remote access as. This should match what
|
||||||
|
|
@ -7618,7 +7618,7 @@ make_tuple_from_result_row(PGresult *res,
|
||||||
errpos.rel = rel;
|
errpos.rel = rel;
|
||||||
errpos.fsstate = fsstate;
|
errpos.fsstate = fsstate;
|
||||||
errcallback.callback = conversion_error_callback;
|
errcallback.callback = conversion_error_callback;
|
||||||
errcallback.arg = (void *) &errpos;
|
errcallback.arg = &errpos;
|
||||||
errcallback.previous = error_context_stack;
|
errcallback.previous = error_context_stack;
|
||||||
error_context_stack = &errcallback;
|
error_context_stack = &errcallback;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1222,7 +1222,7 @@ brinbuild(Relation heap, Relation index, IndexInfo *indexInfo)
|
||||||
* generate summary for the same range twice).
|
* generate summary for the same range twice).
|
||||||
*/
|
*/
|
||||||
reltuples = table_index_build_scan(heap, index, indexInfo, false, true,
|
reltuples = table_index_build_scan(heap, index, indexInfo, false, true,
|
||||||
brinbuildCallback, (void *) state, NULL);
|
brinbuildCallback, state, NULL);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* process the final batch
|
* process the final batch
|
||||||
|
|
@ -1808,7 +1808,7 @@ summarize_range(IndexInfo *indexInfo, BrinBuildState *state, Relation heapRel,
|
||||||
state->bs_currRangeStart = heapBlk;
|
state->bs_currRangeStart = heapBlk;
|
||||||
table_index_build_range_scan(heapRel, state->bs_irel, indexInfo, false, true, false,
|
table_index_build_range_scan(heapRel, state->bs_irel, indexInfo, false, true, false,
|
||||||
heapBlk, scanNumBlks,
|
heapBlk, scanNumBlks,
|
||||||
brinbuildCallback, (void *) state, NULL);
|
brinbuildCallback, state, NULL);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Now we update the values obtained by the scan with the placeholder
|
* Now we update the values obtained by the scan with the placeholder
|
||||||
|
|
|
||||||
|
|
@ -413,7 +413,7 @@ AssertCheckRanges(Ranges *ranges, FmgrInfo *cmpFn, Oid colloid)
|
||||||
|
|
||||||
Assert(bsearch_arg(&value, &ranges->values[2 * ranges->nranges],
|
Assert(bsearch_arg(&value, &ranges->values[2 * ranges->nranges],
|
||||||
ranges->nsorted, sizeof(Datum),
|
ranges->nsorted, sizeof(Datum),
|
||||||
compare_values, (void *) &cxt) == NULL);
|
compare_values, &cxt) == NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -550,7 +550,7 @@ range_deduplicate_values(Ranges *range)
|
||||||
/* same as preceding value, so store it */
|
/* same as preceding value, so store it */
|
||||||
if (compare_values(&range->values[start + i - 1],
|
if (compare_values(&range->values[start + i - 1],
|
||||||
&range->values[start + i],
|
&range->values[start + i],
|
||||||
(void *) &cxt) == 0)
|
&cxt) == 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
range->values[start + n] = range->values[start + i];
|
range->values[start + n] = range->values[start + i];
|
||||||
|
|
@ -1085,7 +1085,7 @@ range_contains_value(BrinDesc *bdesc, Oid colloid,
|
||||||
|
|
||||||
if (bsearch_arg(&newval, &ranges->values[2 * ranges->nranges],
|
if (bsearch_arg(&newval, &ranges->values[2 * ranges->nranges],
|
||||||
ranges->nsorted, sizeof(Datum),
|
ranges->nsorted, sizeof(Datum),
|
||||||
compare_values, (void *) &cxt) != NULL)
|
compare_values, &cxt) != NULL)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -1206,7 +1206,7 @@ sort_expanded_ranges(FmgrInfo *cmp, Oid colloid,
|
||||||
for (i = 1; i < neranges; i++)
|
for (i = 1; i < neranges; i++)
|
||||||
{
|
{
|
||||||
/* if the current range is equal to the preceding one, do nothing */
|
/* if the current range is equal to the preceding one, do nothing */
|
||||||
if (!compare_expanded_ranges(&eranges[i - 1], &eranges[i], (void *) &cxt))
|
if (!compare_expanded_ranges(&eranges[i - 1], &eranges[i], &cxt))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* otherwise, copy it to n-th place (if not already there) */
|
/* otherwise, copy it to n-th place (if not already there) */
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,7 @@ detoast_external_attr(struct varlena *attr)
|
||||||
eoh = DatumGetEOHP(PointerGetDatum(attr));
|
eoh = DatumGetEOHP(PointerGetDatum(attr));
|
||||||
resultsize = EOH_get_flat_size(eoh);
|
resultsize = EOH_get_flat_size(eoh);
|
||||||
result = (struct varlena *) palloc(resultsize);
|
result = (struct varlena *) palloc(resultsize);
|
||||||
EOH_flatten_into(eoh, (void *) result, resultsize);
|
EOH_flatten_into(eoh, result, resultsize);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -117,7 +117,7 @@ ginInitBA(BuildAccumulator *accum)
|
||||||
ginCombineData,
|
ginCombineData,
|
||||||
ginAllocEntryAccumulator,
|
ginAllocEntryAccumulator,
|
||||||
NULL, /* no freefunc needed */
|
NULL, /* no freefunc needed */
|
||||||
(void *) accum);
|
accum);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -380,8 +380,7 @@ ginbuild(Relation heap, Relation index, IndexInfo *indexInfo)
|
||||||
* prefers to receive tuples in TID order.
|
* prefers to receive tuples in TID order.
|
||||||
*/
|
*/
|
||||||
reltuples = table_index_build_scan(heap, index, indexInfo, false, true,
|
reltuples = table_index_build_scan(heap, index, indexInfo, false, true,
|
||||||
ginBuildCallback, (void *) &buildstate,
|
ginBuildCallback, &buildstate, NULL);
|
||||||
NULL);
|
|
||||||
|
|
||||||
/* dump remaining entries to the index */
|
/* dump remaining entries to the index */
|
||||||
oldCtx = MemoryContextSwitchTo(buildstate.tmpCtx);
|
oldCtx = MemoryContextSwitchTo(buildstate.tmpCtx);
|
||||||
|
|
@ -497,7 +496,7 @@ gininsert(Relation index, Datum *values, bool *isnull,
|
||||||
oldCtx = MemoryContextSwitchTo(indexInfo->ii_Context);
|
oldCtx = MemoryContextSwitchTo(indexInfo->ii_Context);
|
||||||
ginstate = (GinState *) palloc(sizeof(GinState));
|
ginstate = (GinState *) palloc(sizeof(GinState));
|
||||||
initGinState(ginstate, index);
|
initGinState(ginstate, index);
|
||||||
indexInfo->ii_AmCache = (void *) ginstate;
|
indexInfo->ii_AmCache = ginstate;
|
||||||
MemoryContextSwitchTo(oldCtx);
|
MemoryContextSwitchTo(oldCtx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -173,7 +173,7 @@ gistinsert(Relation r, Datum *values, bool *isnull,
|
||||||
oldCxt = MemoryContextSwitchTo(indexInfo->ii_Context);
|
oldCxt = MemoryContextSwitchTo(indexInfo->ii_Context);
|
||||||
giststate = initGISTstate(r);
|
giststate = initGISTstate(r);
|
||||||
giststate->tempCxt = createTempGistContext();
|
giststate->tempCxt = createTempGistContext();
|
||||||
indexInfo->ii_AmCache = (void *) giststate;
|
indexInfo->ii_AmCache = giststate;
|
||||||
MemoryContextSwitchTo(oldCxt);
|
MemoryContextSwitchTo(oldCxt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -273,7 +273,7 @@ gistbuild(Relation heap, Relation index, IndexInfo *indexInfo)
|
||||||
/* Scan the table, adding all tuples to the tuplesort */
|
/* Scan the table, adding all tuples to the tuplesort */
|
||||||
reltuples = table_index_build_scan(heap, index, indexInfo, true, true,
|
reltuples = table_index_build_scan(heap, index, indexInfo, true, true,
|
||||||
gistSortedBuildCallback,
|
gistSortedBuildCallback,
|
||||||
(void *) &buildstate, NULL);
|
&buildstate, NULL);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Perform the sort and build index pages.
|
* Perform the sort and build index pages.
|
||||||
|
|
@ -312,7 +312,7 @@ gistbuild(Relation heap, Relation index, IndexInfo *indexInfo)
|
||||||
/* Scan the table, inserting all the tuples to the index. */
|
/* Scan the table, inserting all the tuples to the index. */
|
||||||
reltuples = table_index_build_scan(heap, index, indexInfo, true, true,
|
reltuples = table_index_build_scan(heap, index, indexInfo, true, true,
|
||||||
gistBuildCallback,
|
gistBuildCallback,
|
||||||
(void *) &buildstate, NULL);
|
&buildstate, NULL);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If buffering was used, flush out all the tuples that are still in
|
* If buffering was used, flush out all the tuples that are still in
|
||||||
|
|
|
||||||
|
|
@ -173,7 +173,7 @@ hashbuild(Relation heap, Relation index, IndexInfo *indexInfo)
|
||||||
/* do the heap scan */
|
/* do the heap scan */
|
||||||
reltuples = table_index_build_scan(heap, index, indexInfo, true, true,
|
reltuples = table_index_build_scan(heap, index, indexInfo, true, true,
|
||||||
hashbuildCallback,
|
hashbuildCallback,
|
||||||
(void *) &buildstate, NULL);
|
&buildstate, NULL);
|
||||||
pgstat_progress_update_param(PROGRESS_CREATEIDX_TUPLES_TOTAL,
|
pgstat_progress_update_param(PROGRESS_CREATEIDX_TUPLES_TOTAL,
|
||||||
buildstate.indtuples);
|
buildstate.indtuples);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2453,7 +2453,7 @@ lazy_vacuum_one_index(Relation indrel, IndexBulkDeleteResult *istat,
|
||||||
InvalidBlockNumber, InvalidOffsetNumber);
|
InvalidBlockNumber, InvalidOffsetNumber);
|
||||||
|
|
||||||
/* Do bulk deletion */
|
/* Do bulk deletion */
|
||||||
istat = vac_bulkdel_one_index(&ivinfo, istat, (void *) vacrel->dead_items,
|
istat = vac_bulkdel_one_index(&ivinfo, istat, vacrel->dead_items,
|
||||||
vacrel->dead_items_info);
|
vacrel->dead_items_info);
|
||||||
|
|
||||||
/* Revert to the previous phase information for error traceback */
|
/* Revert to the previous phase information for error traceback */
|
||||||
|
|
|
||||||
|
|
@ -566,7 +566,7 @@ btparallelrescan(IndexScanDesc scan)
|
||||||
|
|
||||||
Assert(parallel_scan);
|
Assert(parallel_scan);
|
||||||
|
|
||||||
btscan = (BTParallelScanDesc) OffsetToPointer((void *) parallel_scan,
|
btscan = (BTParallelScanDesc) OffsetToPointer(parallel_scan,
|
||||||
parallel_scan->ps_offset);
|
parallel_scan->ps_offset);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -644,7 +644,7 @@ _bt_parallel_seize(IndexScanDesc scan, BlockNumber *next_scan_page,
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
btscan = (BTParallelScanDesc) OffsetToPointer((void *) parallel_scan,
|
btscan = (BTParallelScanDesc) OffsetToPointer(parallel_scan,
|
||||||
parallel_scan->ps_offset);
|
parallel_scan->ps_offset);
|
||||||
|
|
||||||
while (1)
|
while (1)
|
||||||
|
|
@ -752,7 +752,7 @@ _bt_parallel_release(IndexScanDesc scan, BlockNumber next_scan_page,
|
||||||
|
|
||||||
Assert(BlockNumberIsValid(next_scan_page));
|
Assert(BlockNumberIsValid(next_scan_page));
|
||||||
|
|
||||||
btscan = (BTParallelScanDesc) OffsetToPointer((void *) parallel_scan,
|
btscan = (BTParallelScanDesc) OffsetToPointer(parallel_scan,
|
||||||
parallel_scan->ps_offset);
|
parallel_scan->ps_offset);
|
||||||
|
|
||||||
SpinLockAcquire(&btscan->btps_mutex);
|
SpinLockAcquire(&btscan->btps_mutex);
|
||||||
|
|
@ -791,7 +791,7 @@ _bt_parallel_done(IndexScanDesc scan)
|
||||||
if (so->needPrimScan)
|
if (so->needPrimScan)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
btscan = (BTParallelScanDesc) OffsetToPointer((void *) parallel_scan,
|
btscan = (BTParallelScanDesc) OffsetToPointer(parallel_scan,
|
||||||
parallel_scan->ps_offset);
|
parallel_scan->ps_offset);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -829,7 +829,7 @@ _bt_parallel_primscan_schedule(IndexScanDesc scan, BlockNumber curr_page)
|
||||||
|
|
||||||
Assert(so->numArrayKeys);
|
Assert(so->numArrayKeys);
|
||||||
|
|
||||||
btscan = (BTParallelScanDesc) OffsetToPointer((void *) parallel_scan,
|
btscan = (BTParallelScanDesc) OffsetToPointer(parallel_scan,
|
||||||
parallel_scan->ps_offset);
|
parallel_scan->ps_offset);
|
||||||
|
|
||||||
SpinLockAcquire(&btscan->btps_mutex);
|
SpinLockAcquire(&btscan->btps_mutex);
|
||||||
|
|
|
||||||
|
|
@ -475,7 +475,7 @@ _bt_spools_heapscan(Relation heap, Relation index, BTBuildState *buildstate,
|
||||||
/* Fill spool using either serial or parallel heap scan */
|
/* Fill spool using either serial or parallel heap scan */
|
||||||
if (!buildstate->btleader)
|
if (!buildstate->btleader)
|
||||||
reltuples = table_index_build_scan(heap, index, indexInfo, true, true,
|
reltuples = table_index_build_scan(heap, index, indexInfo, true, true,
|
||||||
_bt_build_callback, (void *) buildstate,
|
_bt_build_callback, buildstate,
|
||||||
NULL);
|
NULL);
|
||||||
else
|
else
|
||||||
reltuples = _bt_parallel_heapscan(buildstate,
|
reltuples = _bt_parallel_heapscan(buildstate,
|
||||||
|
|
@ -1930,7 +1930,7 @@ _bt_parallel_scan_and_sort(BTSpool *btspool, BTSpool *btspool2,
|
||||||
ParallelTableScanFromBTShared(btshared));
|
ParallelTableScanFromBTShared(btshared));
|
||||||
reltuples = table_index_build_scan(btspool->heap, btspool->index, indexInfo,
|
reltuples = table_index_build_scan(btspool->heap, btspool->index, indexInfo,
|
||||||
true, progress, _bt_build_callback,
|
true, progress, _bt_build_callback,
|
||||||
(void *) &buildstate, scan);
|
&buildstate, scan);
|
||||||
|
|
||||||
/* Execute this worker's part of the sort */
|
/* Execute this worker's part of the sort */
|
||||||
if (progress)
|
if (progress)
|
||||||
|
|
|
||||||
|
|
@ -122,7 +122,7 @@ spgbuild(Relation heap, Relation index, IndexInfo *indexInfo)
|
||||||
ALLOCSET_DEFAULT_SIZES);
|
ALLOCSET_DEFAULT_SIZES);
|
||||||
|
|
||||||
reltuples = table_index_build_scan(heap, index, indexInfo, true, true,
|
reltuples = table_index_build_scan(heap, index, indexInfo, true, true,
|
||||||
spgistBuildCallback, (void *) &buildstate,
|
spgistBuildCallback, &buildstate,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
MemoryContextDelete(buildstate.tmpCtx);
|
MemoryContextDelete(buildstate.tmpCtx);
|
||||||
|
|
|
||||||
|
|
@ -279,7 +279,7 @@ spgGetCache(Relation index)
|
||||||
UnlockReleaseBuffer(metabuffer);
|
UnlockReleaseBuffer(metabuffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
index->rd_amcache = (void *) cache;
|
index->rd_amcache = cache;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -747,7 +747,7 @@ pg_prepared_xact(PG_FUNCTION_ARGS)
|
||||||
* out as a result set.
|
* out as a result set.
|
||||||
*/
|
*/
|
||||||
status = (Working_State *) palloc(sizeof(Working_State));
|
status = (Working_State *) palloc(sizeof(Working_State));
|
||||||
funcctx->user_fctx = (void *) status;
|
funcctx->user_fctx = status;
|
||||||
|
|
||||||
status->ngxacts = GetPreparedTransactionList(&status->array);
|
status->ngxacts = GetPreparedTransactionList(&status->array);
|
||||||
status->currIdx = 0;
|
status->currIdx = 0;
|
||||||
|
|
@ -1707,8 +1707,7 @@ ProcessRecords(char *bufptr, TransactionId xid,
|
||||||
bufptr += MAXALIGN(sizeof(TwoPhaseRecordOnDisk));
|
bufptr += MAXALIGN(sizeof(TwoPhaseRecordOnDisk));
|
||||||
|
|
||||||
if (callbacks[record->rmid] != NULL)
|
if (callbacks[record->rmid] != NULL)
|
||||||
callbacks[record->rmid] (xid, record->info,
|
callbacks[record->rmid] (xid, record->info, bufptr, record->len);
|
||||||
(void *) bufptr, record->len);
|
|
||||||
|
|
||||||
bufptr += MAXALIGN(record->len);
|
bufptr += MAXALIGN(record->len);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1913,7 +1913,7 @@ ApplyWalRecord(XLogReaderState *xlogreader, XLogRecord *record, TimeLineID *repl
|
||||||
|
|
||||||
/* Setup error traceback support for ereport() */
|
/* Setup error traceback support for ereport() */
|
||||||
errcallback.callback = rm_redo_error_callback;
|
errcallback.callback = rm_redo_error_callback;
|
||||||
errcallback.arg = (void *) xlogreader;
|
errcallback.arg = xlogreader;
|
||||||
errcallback.previous = error_context_stack;
|
errcallback.previous = error_context_stack;
|
||||||
error_context_stack = &errcallback;
|
error_context_stack = &errcallback;
|
||||||
|
|
||||||
|
|
@ -4821,7 +4821,7 @@ check_recovery_target_lsn(char **newval, void **extra, GucSource source)
|
||||||
|
|
||||||
myextra = (XLogRecPtr *) guc_malloc(ERROR, sizeof(XLogRecPtr));
|
myextra = (XLogRecPtr *) guc_malloc(ERROR, sizeof(XLogRecPtr));
|
||||||
*myextra = lsn;
|
*myextra = lsn;
|
||||||
*extra = (void *) myextra;
|
*extra = myextra;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -4985,7 +4985,7 @@ check_recovery_target_timeline(char **newval, void **extra, GucSource source)
|
||||||
|
|
||||||
myextra = (RecoveryTargetTimeLineGoal *) guc_malloc(ERROR, sizeof(RecoveryTargetTimeLineGoal));
|
myextra = (RecoveryTargetTimeLineGoal *) guc_malloc(ERROR, sizeof(RecoveryTargetTimeLineGoal));
|
||||||
*myextra = rttg;
|
*myextra = rttg;
|
||||||
*extra = (void *) myextra;
|
*extra = myextra;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -5021,7 +5021,7 @@ check_recovery_target_xid(char **newval, void **extra, GucSource source)
|
||||||
|
|
||||||
myextra = (TransactionId *) guc_malloc(ERROR, sizeof(TransactionId));
|
myextra = (TransactionId *) guc_malloc(ERROR, sizeof(TransactionId));
|
||||||
*myextra = xid;
|
*myextra = xid;
|
||||||
*extra = (void *) myextra;
|
*extra = myextra;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2240,7 +2240,7 @@ find_expr_references_walker(Node *node,
|
||||||
context->rtables = lcons(query->rtable, context->rtables);
|
context->rtables = lcons(query->rtable, context->rtables);
|
||||||
result = query_tree_walker(query,
|
result = query_tree_walker(query,
|
||||||
find_expr_references_walker,
|
find_expr_references_walker,
|
||||||
(void *) context,
|
context,
|
||||||
QTW_IGNORE_JOINALIASES |
|
QTW_IGNORE_JOINALIASES |
|
||||||
QTW_EXAMINE_SORTGROUP);
|
QTW_EXAMINE_SORTGROUP);
|
||||||
context->rtables = list_delete_first(context->rtables);
|
context->rtables = list_delete_first(context->rtables);
|
||||||
|
|
@ -2310,7 +2310,7 @@ find_expr_references_walker(Node *node,
|
||||||
}
|
}
|
||||||
|
|
||||||
return expression_tree_walker(node, find_expr_references_walker,
|
return expression_tree_walker(node, find_expr_references_walker,
|
||||||
(void *) context);
|
context);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -3118,7 +3118,7 @@ check_nested_generated_walker(Node *node, void *context)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return expression_tree_walker(node, check_nested_generated_walker,
|
return expression_tree_walker(node, check_nested_generated_walker,
|
||||||
(void *) context);
|
context);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
||||||
|
|
@ -3395,7 +3395,7 @@ validate_index(Oid heapId, Oid indexId, Snapshot snapshot)
|
||||||
|
|
||||||
/* ambulkdelete updates progress metrics */
|
/* ambulkdelete updates progress metrics */
|
||||||
(void) index_bulk_delete(&ivinfo, NULL,
|
(void) index_bulk_delete(&ivinfo, NULL,
|
||||||
validate_index_callback, (void *) &state);
|
validate_index_callback, &state);
|
||||||
|
|
||||||
/* Execute the sort */
|
/* Execute the sort */
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ RunObjectPostCreateHook(Oid classId, Oid objectId, int subId,
|
||||||
|
|
||||||
(*object_access_hook) (OAT_POST_CREATE,
|
(*object_access_hook) (OAT_POST_CREATE,
|
||||||
classId, objectId, subId,
|
classId, objectId, subId,
|
||||||
(void *) &pc_arg);
|
&pc_arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -64,7 +64,7 @@ RunObjectDropHook(Oid classId, Oid objectId, int subId,
|
||||||
|
|
||||||
(*object_access_hook) (OAT_DROP,
|
(*object_access_hook) (OAT_DROP,
|
||||||
classId, objectId, subId,
|
classId, objectId, subId,
|
||||||
(void *) &drop_arg);
|
&drop_arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -103,7 +103,7 @@ RunObjectPostAlterHook(Oid classId, Oid objectId, int subId,
|
||||||
|
|
||||||
(*object_access_hook) (OAT_POST_ALTER,
|
(*object_access_hook) (OAT_POST_ALTER,
|
||||||
classId, objectId, subId,
|
classId, objectId, subId,
|
||||||
(void *) &pa_arg);
|
&pa_arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -125,7 +125,7 @@ RunNamespaceSearchHook(Oid objectId, bool ereport_on_violation)
|
||||||
|
|
||||||
(*object_access_hook) (OAT_NAMESPACE_SEARCH,
|
(*object_access_hook) (OAT_NAMESPACE_SEARCH,
|
||||||
NamespaceRelationId, objectId, 0,
|
NamespaceRelationId, objectId, 0,
|
||||||
(void *) &ns_arg);
|
&ns_arg);
|
||||||
|
|
||||||
return ns_arg.result;
|
return ns_arg.result;
|
||||||
}
|
}
|
||||||
|
|
@ -168,7 +168,7 @@ RunObjectPostCreateHookStr(Oid classId, const char *objectName, int subId,
|
||||||
|
|
||||||
(*object_access_hook_str) (OAT_POST_CREATE,
|
(*object_access_hook_str) (OAT_POST_CREATE,
|
||||||
classId, objectName, subId,
|
classId, objectName, subId,
|
||||||
(void *) &pc_arg);
|
&pc_arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -190,7 +190,7 @@ RunObjectDropHookStr(Oid classId, const char *objectName, int subId,
|
||||||
|
|
||||||
(*object_access_hook_str) (OAT_DROP,
|
(*object_access_hook_str) (OAT_DROP,
|
||||||
classId, objectName, subId,
|
classId, objectName, subId,
|
||||||
(void *) &drop_arg);
|
&drop_arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -229,7 +229,7 @@ RunObjectPostAlterHookStr(Oid classId, const char *objectName, int subId,
|
||||||
|
|
||||||
(*object_access_hook_str) (OAT_POST_ALTER,
|
(*object_access_hook_str) (OAT_POST_ALTER,
|
||||||
classId, objectName, subId,
|
classId, objectName, subId,
|
||||||
(void *) &pa_arg);
|
&pa_arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -251,7 +251,7 @@ RunNamespaceSearchHookStr(const char *objectName, bool ereport_on_violation)
|
||||||
|
|
||||||
(*object_access_hook_str) (OAT_NAMESPACE_SEARCH,
|
(*object_access_hook_str) (OAT_NAMESPACE_SEARCH,
|
||||||
NamespaceRelationId, objectName, 0,
|
NamespaceRelationId, objectName, 0,
|
||||||
(void *) &ns_arg);
|
&ns_arg);
|
||||||
|
|
||||||
return ns_arg.result;
|
return ns_arg.result;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -873,7 +873,7 @@ fmgr_sql_validator(PG_FUNCTION_ARGS)
|
||||||
callback_arg.prosrc = prosrc;
|
callback_arg.prosrc = prosrc;
|
||||||
|
|
||||||
sqlerrcontext.callback = sql_function_parse_error_callback;
|
sqlerrcontext.callback = sql_function_parse_error_callback;
|
||||||
sqlerrcontext.arg = (void *) &callback_arg;
|
sqlerrcontext.arg = &callback_arg;
|
||||||
sqlerrcontext.previous = error_context_stack;
|
sqlerrcontext.previous = error_context_stack;
|
||||||
error_context_stack = &sqlerrcontext;
|
error_context_stack = &sqlerrcontext;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1202,7 +1202,7 @@ pg_get_publication_tables(PG_FUNCTION_ARGS)
|
||||||
PG_NODE_TREEOID, -1, 0);
|
PG_NODE_TREEOID, -1, 0);
|
||||||
|
|
||||||
funcctx->tuple_desc = BlessTupleDesc(tupdesc);
|
funcctx->tuple_desc = BlessTupleDesc(tupdesc);
|
||||||
funcctx->user_fctx = (void *) table_infos;
|
funcctx->user_fctx = table_infos;
|
||||||
|
|
||||||
MemoryContextSwitchTo(oldcontext);
|
MemoryContextSwitchTo(oldcontext);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -959,7 +959,7 @@ CopyFrom(CopyFromState cstate)
|
||||||
|
|
||||||
/* Set up callback to identify error line number */
|
/* Set up callback to identify error line number */
|
||||||
errcallback.callback = CopyFromErrorCallback;
|
errcallback.callback = CopyFromErrorCallback;
|
||||||
errcallback.arg = (void *) cstate;
|
errcallback.arg = cstate;
|
||||||
errcallback.previous = error_context_stack;
|
errcallback.previous = error_context_stack;
|
||||||
error_context_stack = &errcallback;
|
error_context_stack = &errcallback;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1532,7 +1532,7 @@ ImportForeignSchema(ImportForeignSchemaStmt *stmt)
|
||||||
callback_arg.tablename = NULL; /* not known yet */
|
callback_arg.tablename = NULL; /* not known yet */
|
||||||
callback_arg.cmd = cmd;
|
callback_arg.cmd = cmd;
|
||||||
sqlerrcontext.callback = import_error_callback;
|
sqlerrcontext.callback = import_error_callback;
|
||||||
sqlerrcontext.arg = (void *) &callback_arg;
|
sqlerrcontext.arg = &callback_arg;
|
||||||
sqlerrcontext.previous = error_context_stack;
|
sqlerrcontext.previous = error_context_stack;
|
||||||
error_context_stack = &sqlerrcontext;
|
error_context_stack = &sqlerrcontext;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3344,7 +3344,7 @@ ReindexPartitions(const ReindexStmt *stmt, Oid relid, const ReindexParams *param
|
||||||
errinfo.relnamespace = pstrdup(relnamespace);
|
errinfo.relnamespace = pstrdup(relnamespace);
|
||||||
errinfo.relkind = relkind;
|
errinfo.relkind = relkind;
|
||||||
errcallback.callback = reindex_error_callback;
|
errcallback.callback = reindex_error_callback;
|
||||||
errcallback.arg = (void *) &errinfo;
|
errcallback.arg = &errinfo;
|
||||||
errcallback.previous = error_context_stack;
|
errcallback.previous = error_context_stack;
|
||||||
error_context_stack = &errcallback;
|
error_context_stack = &errcallback;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ LockTableCommand(LockStmt *lockstmt)
|
||||||
reloid = RangeVarGetRelidExtended(rv, lockstmt->mode,
|
reloid = RangeVarGetRelidExtended(rv, lockstmt->mode,
|
||||||
lockstmt->nowait ? RVR_NOWAIT : 0,
|
lockstmt->nowait ? RVR_NOWAIT : 0,
|
||||||
RangeVarCallbackForLockTable,
|
RangeVarCallbackForLockTable,
|
||||||
(void *) &lockstmt->mode);
|
&lockstmt->mode);
|
||||||
|
|
||||||
if (get_rel_relkind(reloid) == RELKIND_VIEW)
|
if (get_rel_relkind(reloid) == RELKIND_VIEW)
|
||||||
LockViewRecurse(reloid, lockstmt->mode, lockstmt->nowait, NIL);
|
LockViewRecurse(reloid, lockstmt->mode, lockstmt->nowait, NIL);
|
||||||
|
|
|
||||||
|
|
@ -627,7 +627,7 @@ CreatePolicy(CreatePolicyStmt *stmt)
|
||||||
table_id = RangeVarGetRelidExtended(stmt->table, AccessExclusiveLock,
|
table_id = RangeVarGetRelidExtended(stmt->table, AccessExclusiveLock,
|
||||||
0,
|
0,
|
||||||
RangeVarCallbackForPolicy,
|
RangeVarCallbackForPolicy,
|
||||||
(void *) stmt);
|
stmt);
|
||||||
|
|
||||||
/* Open target_table to build quals. No additional lock is necessary. */
|
/* Open target_table to build quals. No additional lock is necessary. */
|
||||||
target_table = relation_open(table_id, NoLock);
|
target_table = relation_open(table_id, NoLock);
|
||||||
|
|
@ -803,7 +803,7 @@ AlterPolicy(AlterPolicyStmt *stmt)
|
||||||
table_id = RangeVarGetRelidExtended(stmt->table, AccessExclusiveLock,
|
table_id = RangeVarGetRelidExtended(stmt->table, AccessExclusiveLock,
|
||||||
0,
|
0,
|
||||||
RangeVarCallbackForPolicy,
|
RangeVarCallbackForPolicy,
|
||||||
(void *) stmt);
|
stmt);
|
||||||
|
|
||||||
target_table = relation_open(table_id, NoLock);
|
target_table = relation_open(table_id, NoLock);
|
||||||
|
|
||||||
|
|
@ -1108,7 +1108,7 @@ rename_policy(RenameStmt *stmt)
|
||||||
table_id = RangeVarGetRelidExtended(stmt->relation, AccessExclusiveLock,
|
table_id = RangeVarGetRelidExtended(stmt->relation, AccessExclusiveLock,
|
||||||
0,
|
0,
|
||||||
RangeVarCallbackForPolicy,
|
RangeVarCallbackForPolicy,
|
||||||
(void *) stmt);
|
stmt);
|
||||||
|
|
||||||
target_table = relation_open(table_id, NoLock);
|
target_table = relation_open(table_id, NoLock);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -256,7 +256,7 @@ contain_invalid_rfcolumn_walker(Node *node, rf_context *context)
|
||||||
}
|
}
|
||||||
|
|
||||||
return expression_tree_walker(node, contain_invalid_rfcolumn_walker,
|
return expression_tree_walker(node, contain_invalid_rfcolumn_walker,
|
||||||
(void *) context);
|
context);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -570,7 +570,7 @@ check_simple_rowfilter_expr_walker(Node *node, ParseState *pstate)
|
||||||
if (exprType(node) >= FirstNormalObjectId)
|
if (exprType(node) >= FirstNormalObjectId)
|
||||||
errdetail_msg = _("User-defined types are not allowed.");
|
errdetail_msg = _("User-defined types are not allowed.");
|
||||||
else if (check_functions_in_node(node, contain_mutable_or_user_functions_checker,
|
else if (check_functions_in_node(node, contain_mutable_or_user_functions_checker,
|
||||||
(void *) pstate))
|
pstate))
|
||||||
errdetail_msg = _("User-defined or built-in mutable functions are not allowed.");
|
errdetail_msg = _("User-defined or built-in mutable functions are not allowed.");
|
||||||
else if (exprCollation(node) >= FirstNormalObjectId ||
|
else if (exprCollation(node) >= FirstNormalObjectId ||
|
||||||
exprInputCollation(node) >= FirstNormalObjectId)
|
exprInputCollation(node) >= FirstNormalObjectId)
|
||||||
|
|
@ -589,7 +589,7 @@ check_simple_rowfilter_expr_walker(Node *node, ParseState *pstate)
|
||||||
parser_errposition(pstate, exprLocation(node))));
|
parser_errposition(pstate, exprLocation(node))));
|
||||||
|
|
||||||
return expression_tree_walker(node, check_simple_rowfilter_expr_walker,
|
return expression_tree_walker(node, check_simple_rowfilter_expr_walker,
|
||||||
(void *) pstate);
|
pstate);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -1581,7 +1581,7 @@ RemoveRelations(DropStmt *drop)
|
||||||
|
|
||||||
relOid = RangeVarGetRelidExtended(rel, lockmode, RVR_MISSING_OK,
|
relOid = RangeVarGetRelidExtended(rel, lockmode, RVR_MISSING_OK,
|
||||||
RangeVarCallbackForDropRelation,
|
RangeVarCallbackForDropRelation,
|
||||||
(void *) &state);
|
&state);
|
||||||
|
|
||||||
/* Not there? */
|
/* Not there? */
|
||||||
if (!OidIsValid(relOid))
|
if (!OidIsValid(relOid))
|
||||||
|
|
@ -4142,7 +4142,7 @@ RenameRelation(RenameStmt *stmt)
|
||||||
relid = RangeVarGetRelidExtended(stmt->relation, lockmode,
|
relid = RangeVarGetRelidExtended(stmt->relation, lockmode,
|
||||||
stmt->missing_ok ? RVR_MISSING_OK : 0,
|
stmt->missing_ok ? RVR_MISSING_OK : 0,
|
||||||
RangeVarCallbackForAlterRelation,
|
RangeVarCallbackForAlterRelation,
|
||||||
(void *) stmt);
|
stmt);
|
||||||
|
|
||||||
if (!OidIsValid(relid))
|
if (!OidIsValid(relid))
|
||||||
{
|
{
|
||||||
|
|
@ -4390,7 +4390,7 @@ AlterTableLookupRelation(AlterTableStmt *stmt, LOCKMODE lockmode)
|
||||||
return RangeVarGetRelidExtended(stmt->relation, lockmode,
|
return RangeVarGetRelidExtended(stmt->relation, lockmode,
|
||||||
stmt->missing_ok ? RVR_MISSING_OK : 0,
|
stmt->missing_ok ? RVR_MISSING_OK : 0,
|
||||||
RangeVarCallbackForAlterRelation,
|
RangeVarCallbackForAlterRelation,
|
||||||
(void *) stmt);
|
stmt);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -17719,7 +17719,7 @@ AlterTableNamespace(AlterObjectSchemaStmt *stmt, Oid *oldschema)
|
||||||
relid = RangeVarGetRelidExtended(stmt->relation, AccessExclusiveLock,
|
relid = RangeVarGetRelidExtended(stmt->relation, AccessExclusiveLock,
|
||||||
stmt->missing_ok ? RVR_MISSING_OK : 0,
|
stmt->missing_ok ? RVR_MISSING_OK : 0,
|
||||||
RangeVarCallbackForAlterRelation,
|
RangeVarCallbackForAlterRelation,
|
||||||
(void *) stmt);
|
stmt);
|
||||||
|
|
||||||
if (!OidIsValid(relid))
|
if (!OidIsValid(relid))
|
||||||
{
|
{
|
||||||
|
|
@ -20350,7 +20350,7 @@ ATExecAttachPartitionIdx(List **wqueue, Relation parentIdx, RangeVar *name)
|
||||||
partIdxId =
|
partIdxId =
|
||||||
RangeVarGetRelidExtended(name, AccessExclusiveLock, 0,
|
RangeVarGetRelidExtended(name, AccessExclusiveLock, 0,
|
||||||
RangeVarCallbackForAttachIndex,
|
RangeVarCallbackForAttachIndex,
|
||||||
(void *) &state);
|
&state);
|
||||||
/* Not there? */
|
/* Not there? */
|
||||||
if (!OidIsValid(partIdxId))
|
if (!OidIsValid(partIdxId))
|
||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
|
|
|
||||||
|
|
@ -1290,7 +1290,7 @@ check_temp_tablespaces(char **newval, void **extra, GucSource source)
|
||||||
return false;
|
return false;
|
||||||
myextra->numSpcs = numSpcs;
|
myextra->numSpcs = numSpcs;
|
||||||
memcpy(myextra->tblSpcs, tblSpcs, numSpcs * sizeof(Oid));
|
memcpy(myextra->tblSpcs, tblSpcs, numSpcs * sizeof(Oid));
|
||||||
*extra = (void *) myextra;
|
*extra = myextra;
|
||||||
|
|
||||||
pfree(tblSpcs);
|
pfree(tblSpcs);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3562,7 +3562,7 @@ domainAddCheckConstraint(Oid domainOid, Oid domainNamespace, Oid baseTypeOid,
|
||||||
domVal->location = -1; /* will be set when/if used */
|
domVal->location = -1; /* will be set when/if used */
|
||||||
|
|
||||||
pstate->p_pre_columnref_hook = replace_domain_constraint_value;
|
pstate->p_pre_columnref_hook = replace_domain_constraint_value;
|
||||||
pstate->p_ref_hook_state = (void *) domVal;
|
pstate->p_ref_hook_state = domVal;
|
||||||
|
|
||||||
expr = transformExpr(pstate, constr->raw_expr, EXPR_KIND_DOMAIN_CHECK);
|
expr = transformExpr(pstate, constr->raw_expr, EXPR_KIND_DOMAIN_CHECK);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2518,7 +2518,7 @@ vac_bulkdel_one_index(IndexVacuumInfo *ivinfo, IndexBulkDeleteResult *istat,
|
||||||
{
|
{
|
||||||
/* Do bulk deletion */
|
/* Do bulk deletion */
|
||||||
istat = index_bulk_delete(ivinfo, istat, vac_tid_reaped,
|
istat = index_bulk_delete(ivinfo, istat, vac_tid_reaped,
|
||||||
(void *) dead_items);
|
dead_items);
|
||||||
|
|
||||||
ereport(ivinfo->message_level,
|
ereport(ivinfo->message_level,
|
||||||
(errmsg("scanned index \"%s\" to remove %lld row versions",
|
(errmsg("scanned index \"%s\" to remove %lld row versions",
|
||||||
|
|
|
||||||
|
|
@ -232,7 +232,7 @@ check_datestyle(char **newval, void **extra, GucSource source)
|
||||||
return false;
|
return false;
|
||||||
myextra[0] = newDateStyle;
|
myextra[0] = newDateStyle;
|
||||||
myextra[1] = newDateOrder;
|
myextra[1] = newDateOrder;
|
||||||
*extra = (void *) myextra;
|
*extra = myextra;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -901,7 +901,7 @@ check_session_authorization(char **newval, void **extra, GucSource source)
|
||||||
return false;
|
return false;
|
||||||
myextra->roleid = roleid;
|
myextra->roleid = roleid;
|
||||||
myextra->is_superuser = is_superuser;
|
myextra->is_superuser = is_superuser;
|
||||||
*extra = (void *) myextra;
|
*extra = myextra;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -1015,7 +1015,7 @@ check_role(char **newval, void **extra, GucSource source)
|
||||||
return false;
|
return false;
|
||||||
myextra->roleid = roleid;
|
myextra->roleid = roleid;
|
||||||
myextra->is_superuser = is_superuser;
|
myextra->is_superuser = is_superuser;
|
||||||
*extra = (void *) myextra;
|
*extra = myextra;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2916,8 +2916,7 @@ expr_setup_walker(Node *node, ExprSetupInfo *info)
|
||||||
return false;
|
return false;
|
||||||
if (IsA(node, GroupingFunc))
|
if (IsA(node, GroupingFunc))
|
||||||
return false;
|
return false;
|
||||||
return expression_tree_walker(node, expr_setup_walker,
|
return expression_tree_walker(node, expr_setup_walker, info);
|
||||||
(void *) info);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -281,44 +281,44 @@ ExecReadyInterpretedExpr(ExprState *state)
|
||||||
if (step0 == EEOP_INNER_FETCHSOME &&
|
if (step0 == EEOP_INNER_FETCHSOME &&
|
||||||
step1 == EEOP_INNER_VAR)
|
step1 == EEOP_INNER_VAR)
|
||||||
{
|
{
|
||||||
state->evalfunc_private = (void *) ExecJustInnerVar;
|
state->evalfunc_private = ExecJustInnerVar;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (step0 == EEOP_OUTER_FETCHSOME &&
|
else if (step0 == EEOP_OUTER_FETCHSOME &&
|
||||||
step1 == EEOP_OUTER_VAR)
|
step1 == EEOP_OUTER_VAR)
|
||||||
{
|
{
|
||||||
state->evalfunc_private = (void *) ExecJustOuterVar;
|
state->evalfunc_private = ExecJustOuterVar;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (step0 == EEOP_SCAN_FETCHSOME &&
|
else if (step0 == EEOP_SCAN_FETCHSOME &&
|
||||||
step1 == EEOP_SCAN_VAR)
|
step1 == EEOP_SCAN_VAR)
|
||||||
{
|
{
|
||||||
state->evalfunc_private = (void *) ExecJustScanVar;
|
state->evalfunc_private = ExecJustScanVar;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (step0 == EEOP_INNER_FETCHSOME &&
|
else if (step0 == EEOP_INNER_FETCHSOME &&
|
||||||
step1 == EEOP_ASSIGN_INNER_VAR)
|
step1 == EEOP_ASSIGN_INNER_VAR)
|
||||||
{
|
{
|
||||||
state->evalfunc_private = (void *) ExecJustAssignInnerVar;
|
state->evalfunc_private = ExecJustAssignInnerVar;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (step0 == EEOP_OUTER_FETCHSOME &&
|
else if (step0 == EEOP_OUTER_FETCHSOME &&
|
||||||
step1 == EEOP_ASSIGN_OUTER_VAR)
|
step1 == EEOP_ASSIGN_OUTER_VAR)
|
||||||
{
|
{
|
||||||
state->evalfunc_private = (void *) ExecJustAssignOuterVar;
|
state->evalfunc_private = ExecJustAssignOuterVar;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (step0 == EEOP_SCAN_FETCHSOME &&
|
else if (step0 == EEOP_SCAN_FETCHSOME &&
|
||||||
step1 == EEOP_ASSIGN_SCAN_VAR)
|
step1 == EEOP_ASSIGN_SCAN_VAR)
|
||||||
{
|
{
|
||||||
state->evalfunc_private = (void *) ExecJustAssignScanVar;
|
state->evalfunc_private = ExecJustAssignScanVar;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (step0 == EEOP_CASE_TESTVAL &&
|
else if (step0 == EEOP_CASE_TESTVAL &&
|
||||||
step1 == EEOP_FUNCEXPR_STRICT &&
|
step1 == EEOP_FUNCEXPR_STRICT &&
|
||||||
state->steps[0].d.casetest.value)
|
state->steps[0].d.casetest.value)
|
||||||
{
|
{
|
||||||
state->evalfunc_private = (void *) ExecJustApplyFuncToCase;
|
state->evalfunc_private = ExecJustApplyFuncToCase;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -328,37 +328,37 @@ ExecReadyInterpretedExpr(ExprState *state)
|
||||||
|
|
||||||
if (step0 == EEOP_CONST)
|
if (step0 == EEOP_CONST)
|
||||||
{
|
{
|
||||||
state->evalfunc_private = (void *) ExecJustConst;
|
state->evalfunc_private = ExecJustConst;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (step0 == EEOP_INNER_VAR)
|
else if (step0 == EEOP_INNER_VAR)
|
||||||
{
|
{
|
||||||
state->evalfunc_private = (void *) ExecJustInnerVarVirt;
|
state->evalfunc_private = ExecJustInnerVarVirt;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (step0 == EEOP_OUTER_VAR)
|
else if (step0 == EEOP_OUTER_VAR)
|
||||||
{
|
{
|
||||||
state->evalfunc_private = (void *) ExecJustOuterVarVirt;
|
state->evalfunc_private = ExecJustOuterVarVirt;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (step0 == EEOP_SCAN_VAR)
|
else if (step0 == EEOP_SCAN_VAR)
|
||||||
{
|
{
|
||||||
state->evalfunc_private = (void *) ExecJustScanVarVirt;
|
state->evalfunc_private = ExecJustScanVarVirt;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (step0 == EEOP_ASSIGN_INNER_VAR)
|
else if (step0 == EEOP_ASSIGN_INNER_VAR)
|
||||||
{
|
{
|
||||||
state->evalfunc_private = (void *) ExecJustAssignInnerVarVirt;
|
state->evalfunc_private = ExecJustAssignInnerVarVirt;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (step0 == EEOP_ASSIGN_OUTER_VAR)
|
else if (step0 == EEOP_ASSIGN_OUTER_VAR)
|
||||||
{
|
{
|
||||||
state->evalfunc_private = (void *) ExecJustAssignOuterVarVirt;
|
state->evalfunc_private = ExecJustAssignOuterVarVirt;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (step0 == EEOP_ASSIGN_SCAN_VAR)
|
else if (step0 == EEOP_ASSIGN_SCAN_VAR)
|
||||||
{
|
{
|
||||||
state->evalfunc_private = (void *) ExecJustAssignScanVarVirt;
|
state->evalfunc_private = ExecJustAssignScanVarVirt;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -379,7 +379,7 @@ ExecReadyInterpretedExpr(ExprState *state)
|
||||||
state->flags |= EEO_FLAG_DIRECT_THREADED;
|
state->flags |= EEO_FLAG_DIRECT_THREADED;
|
||||||
#endif /* EEO_USE_COMPUTED_GOTO */
|
#endif /* EEO_USE_COMPUTED_GOTO */
|
||||||
|
|
||||||
state->evalfunc_private = (void *) ExecInterpExpr;
|
state->evalfunc_private = ExecInterpExpr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -2226,7 +2226,7 @@ get_cached_rowtype(Oid type_id, int32 typmod,
|
||||||
(errcode(ERRCODE_WRONG_OBJECT_TYPE),
|
(errcode(ERRCODE_WRONG_OBJECT_TYPE),
|
||||||
errmsg("type %s is not composite",
|
errmsg("type %s is not composite",
|
||||||
format_type_be(type_id))));
|
format_type_be(type_id))));
|
||||||
rowcache->cacheptr = (void *) typentry;
|
rowcache->cacheptr = typentry;
|
||||||
rowcache->tupdesc_id = typentry->tupDesc_identifier;
|
rowcache->tupdesc_id = typentry->tupDesc_identifier;
|
||||||
if (changed)
|
if (changed)
|
||||||
*changed = true;
|
*changed = true;
|
||||||
|
|
@ -2251,7 +2251,7 @@ get_cached_rowtype(Oid type_id, int32 typmod,
|
||||||
tupDesc = lookup_rowtype_tupdesc(type_id, typmod);
|
tupDesc = lookup_rowtype_tupdesc(type_id, typmod);
|
||||||
/* Drop pin acquired by lookup_rowtype_tupdesc */
|
/* Drop pin acquired by lookup_rowtype_tupdesc */
|
||||||
ReleaseTupleDesc(tupDesc);
|
ReleaseTupleDesc(tupDesc);
|
||||||
rowcache->cacheptr = (void *) tupDesc;
|
rowcache->cacheptr = tupDesc;
|
||||||
rowcache->tupdesc_id = 0; /* not a valid value for non-RECORD */
|
rowcache->tupdesc_id = 0; /* not a valid value for non-RECORD */
|
||||||
if (changed)
|
if (changed)
|
||||||
*changed = true;
|
*changed = true;
|
||||||
|
|
|
||||||
|
|
@ -1130,7 +1130,7 @@ index_expression_changed_walker(Node *node, Bitmapset *allUpdatedCols)
|
||||||
}
|
}
|
||||||
|
|
||||||
return expression_tree_walker(node, index_expression_changed_walker,
|
return expression_tree_walker(node, index_expression_changed_walker,
|
||||||
(void *) allUpdatedCols);
|
allUpdatedCols);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -268,7 +268,7 @@ sql_fn_parser_setup(struct ParseState *pstate, SQLFunctionParseInfoPtr pinfo)
|
||||||
pstate->p_post_columnref_hook = sql_fn_post_column_ref;
|
pstate->p_post_columnref_hook = sql_fn_post_column_ref;
|
||||||
pstate->p_paramref_hook = sql_fn_param_ref;
|
pstate->p_paramref_hook = sql_fn_param_ref;
|
||||||
/* no need to use p_coerce_param_hook */
|
/* no need to use p_coerce_param_hook */
|
||||||
pstate->p_ref_hook_state = (void *) pinfo;
|
pstate->p_ref_hook_state = pinfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -614,7 +614,7 @@ init_sql_fcache(FunctionCallInfo fcinfo, Oid collation, bool lazyEvalOK)
|
||||||
*/
|
*/
|
||||||
fcache = (SQLFunctionCachePtr) palloc0(sizeof(SQLFunctionCache));
|
fcache = (SQLFunctionCachePtr) palloc0(sizeof(SQLFunctionCache));
|
||||||
fcache->fcontext = fcontext;
|
fcache->fcontext = fcontext;
|
||||||
finfo->fn_extra = (void *) fcache;
|
finfo->fn_extra = fcache;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* get the procedure tuple corresponding to the given function Oid
|
* get the procedure tuple corresponding to the given function Oid
|
||||||
|
|
|
||||||
|
|
@ -1088,7 +1088,7 @@ finalize_aggregate(AggState *aggstate,
|
||||||
InitFunctionCallInfoData(*fcinfo, &peragg->finalfn,
|
InitFunctionCallInfoData(*fcinfo, &peragg->finalfn,
|
||||||
numFinalArgs,
|
numFinalArgs,
|
||||||
pertrans->aggCollation,
|
pertrans->aggCollation,
|
||||||
(void *) aggstate, NULL);
|
(Node *) aggstate, NULL);
|
||||||
|
|
||||||
/* Fill in the transition state value */
|
/* Fill in the transition state value */
|
||||||
fcinfo->args[0].value =
|
fcinfo->args[0].value =
|
||||||
|
|
@ -1440,12 +1440,11 @@ find_cols_walker(Node *node, FindColsContext *context)
|
||||||
{
|
{
|
||||||
Assert(!context->is_aggref);
|
Assert(!context->is_aggref);
|
||||||
context->is_aggref = true;
|
context->is_aggref = true;
|
||||||
expression_tree_walker(node, find_cols_walker, (void *) context);
|
expression_tree_walker(node, find_cols_walker, context);
|
||||||
context->is_aggref = false;
|
context->is_aggref = false;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return expression_tree_walker(node, find_cols_walker,
|
return expression_tree_walker(node, find_cols_walker, context);
|
||||||
(void *) context);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -4101,7 +4100,7 @@ build_pertrans_for_aggref(AggStatePerTrans pertrans,
|
||||||
&pertrans->transfn,
|
&pertrans->transfn,
|
||||||
numTransArgs,
|
numTransArgs,
|
||||||
pertrans->aggCollation,
|
pertrans->aggCollation,
|
||||||
(void *) aggstate, NULL);
|
(Node *) aggstate, NULL);
|
||||||
|
|
||||||
/* get info about the state value's datatype */
|
/* get info about the state value's datatype */
|
||||||
get_typlenbyval(aggtranstype,
|
get_typlenbyval(aggtranstype,
|
||||||
|
|
@ -4121,7 +4120,7 @@ build_pertrans_for_aggref(AggStatePerTrans pertrans,
|
||||||
&pertrans->serialfn,
|
&pertrans->serialfn,
|
||||||
1,
|
1,
|
||||||
InvalidOid,
|
InvalidOid,
|
||||||
(void *) aggstate, NULL);
|
(Node *) aggstate, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (OidIsValid(aggdeserialfn))
|
if (OidIsValid(aggdeserialfn))
|
||||||
|
|
@ -4137,7 +4136,7 @@ build_pertrans_for_aggref(AggStatePerTrans pertrans,
|
||||||
&pertrans->deserialfn,
|
&pertrans->deserialfn,
|
||||||
2,
|
2,
|
||||||
InvalidOid,
|
InvalidOid,
|
||||||
(void *) aggstate, NULL);
|
(Node *) aggstate, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -122,7 +122,7 @@ ExecSort(PlanState *pstate)
|
||||||
tuplesortopts);
|
tuplesortopts);
|
||||||
if (node->bounded)
|
if (node->bounded)
|
||||||
tuplesort_set_bound(tuplesortstate, node->bound);
|
tuplesort_set_bound(tuplesortstate, node->bound);
|
||||||
node->tuplesortstate = (void *) tuplesortstate;
|
node->tuplesortstate = tuplesortstate;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Scan the subplan and feed all the tuples to tuplesort using the
|
* Scan the subplan and feed all the tuples to tuplesort using the
|
||||||
|
|
|
||||||
|
|
@ -339,7 +339,7 @@ advance_windowaggregate(WindowAggState *winstate,
|
||||||
InitFunctionCallInfoData(*fcinfo, &(peraggstate->transfn),
|
InitFunctionCallInfoData(*fcinfo, &(peraggstate->transfn),
|
||||||
numArguments + 1,
|
numArguments + 1,
|
||||||
perfuncstate->winCollation,
|
perfuncstate->winCollation,
|
||||||
(void *) winstate, NULL);
|
(Node *) winstate, NULL);
|
||||||
fcinfo->args[0].value = peraggstate->transValue;
|
fcinfo->args[0].value = peraggstate->transValue;
|
||||||
fcinfo->args[0].isnull = peraggstate->transValueIsNull;
|
fcinfo->args[0].isnull = peraggstate->transValueIsNull;
|
||||||
winstate->curaggcontext = peraggstate->aggcontext;
|
winstate->curaggcontext = peraggstate->aggcontext;
|
||||||
|
|
@ -510,7 +510,7 @@ advance_windowaggregate_base(WindowAggState *winstate,
|
||||||
InitFunctionCallInfoData(*fcinfo, &(peraggstate->invtransfn),
|
InitFunctionCallInfoData(*fcinfo, &(peraggstate->invtransfn),
|
||||||
numArguments + 1,
|
numArguments + 1,
|
||||||
perfuncstate->winCollation,
|
perfuncstate->winCollation,
|
||||||
(void *) winstate, NULL);
|
(Node *) winstate, NULL);
|
||||||
fcinfo->args[0].value = peraggstate->transValue;
|
fcinfo->args[0].value = peraggstate->transValue;
|
||||||
fcinfo->args[0].isnull = peraggstate->transValueIsNull;
|
fcinfo->args[0].isnull = peraggstate->transValueIsNull;
|
||||||
winstate->curaggcontext = peraggstate->aggcontext;
|
winstate->curaggcontext = peraggstate->aggcontext;
|
||||||
|
|
@ -601,7 +601,7 @@ finalize_windowaggregate(WindowAggState *winstate,
|
||||||
InitFunctionCallInfoData(fcinfodata.fcinfo, &(peraggstate->finalfn),
|
InitFunctionCallInfoData(fcinfodata.fcinfo, &(peraggstate->finalfn),
|
||||||
numFinalArgs,
|
numFinalArgs,
|
||||||
perfuncstate->winCollation,
|
perfuncstate->winCollation,
|
||||||
(void *) winstate, NULL);
|
(Node *) winstate, NULL);
|
||||||
fcinfo->args[0].value =
|
fcinfo->args[0].value =
|
||||||
MakeExpandedObjectReadOnly(peraggstate->transValue,
|
MakeExpandedObjectReadOnly(peraggstate->transValue,
|
||||||
peraggstate->transValueIsNull,
|
peraggstate->transValueIsNull,
|
||||||
|
|
@ -1047,7 +1047,7 @@ eval_windowfunction(WindowAggState *winstate, WindowStatePerFunc perfuncstate,
|
||||||
InitFunctionCallInfoData(*fcinfo, &(perfuncstate->flinfo),
|
InitFunctionCallInfoData(*fcinfo, &(perfuncstate->flinfo),
|
||||||
perfuncstate->numArguments,
|
perfuncstate->numArguments,
|
||||||
perfuncstate->winCollation,
|
perfuncstate->winCollation,
|
||||||
(void *) perfuncstate->winobj, NULL);
|
(Node *) perfuncstate->winobj, NULL);
|
||||||
/* Just in case, make all the regular argument slots be null */
|
/* Just in case, make all the regular argument slots be null */
|
||||||
for (int argno = 0; argno < perfuncstate->numArguments; argno++)
|
for (int argno = 0; argno < perfuncstate->numArguments; argno++)
|
||||||
fcinfo->args[argno].isnull = true;
|
fcinfo->args[argno].isnull = true;
|
||||||
|
|
|
||||||
|
|
@ -702,7 +702,7 @@ tokenize_auth_file(const char *filename, FILE *file, List **tok_lines,
|
||||||
callback_arg.linenum = line_number;
|
callback_arg.linenum = line_number;
|
||||||
|
|
||||||
tokenerrcontext.callback = tokenize_error_callback;
|
tokenerrcontext.callback = tokenize_error_callback;
|
||||||
tokenerrcontext.arg = (void *) &callback_arg;
|
tokenerrcontext.arg = &callback_arg;
|
||||||
tokenerrcontext.previous = error_context_stack;
|
tokenerrcontext.previous = error_context_stack;
|
||||||
error_context_stack = &tokenerrcontext;
|
error_context_stack = &tokenerrcontext;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2020,7 +2020,7 @@ check_functions_in_node(Node *node, check_function_callback checker,
|
||||||
* ... do special actions for other node types
|
* ... do special actions for other node types
|
||||||
* }
|
* }
|
||||||
* // for any node type not specially processed, do:
|
* // for any node type not specially processed, do:
|
||||||
* return expression_tree_walker(node, my_walker, (void *) context);
|
* return expression_tree_walker(node, my_walker, context);
|
||||||
* }
|
* }
|
||||||
*
|
*
|
||||||
* The "context" argument points to a struct that holds whatever context
|
* The "context" argument points to a struct that holds whatever context
|
||||||
|
|
@ -2893,7 +2893,7 @@ range_table_entry_walker_impl(RangeTblEntry *rte,
|
||||||
* ... do special transformations of other node types
|
* ... do special transformations of other node types
|
||||||
* }
|
* }
|
||||||
* // for any node type not specially processed, do:
|
* // for any node type not specially processed, do:
|
||||||
* return expression_tree_mutator(node, my_mutator, (void *) context);
|
* return expression_tree_mutator(node, my_mutator, context);
|
||||||
* }
|
* }
|
||||||
*
|
*
|
||||||
* The "context" argument points to a struct that holds whatever context
|
* The "context" argument points to a struct that holds whatever context
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ makeParamList(int numParams)
|
||||||
retval->paramCompile = NULL;
|
retval->paramCompile = NULL;
|
||||||
retval->paramCompileArg = NULL;
|
retval->paramCompileArg = NULL;
|
||||||
retval->parserSetup = paramlist_parser_setup;
|
retval->parserSetup = paramlist_parser_setup;
|
||||||
retval->parserSetupArg = (void *) retval;
|
retval->parserSetupArg = retval;
|
||||||
retval->paramValuesStr = NULL;
|
retval->paramValuesStr = NULL;
|
||||||
retval->numParams = numParams;
|
retval->numParams = numParams;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -507,5 +507,5 @@ nodeRead(const char *token, int tok_len)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (void *) result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -99,7 +99,7 @@ geqo(PlannerInfo *root, int number_of_rels, List *initial_rels)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* set up private information */
|
/* set up private information */
|
||||||
root->join_search_private = (void *) &private;
|
root->join_search_private = &private;
|
||||||
private.initial_rels = initial_rels;
|
private.initial_rels = initial_rels;
|
||||||
|
|
||||||
/* initialize private number generator */
|
/* initialize private number generator */
|
||||||
|
|
|
||||||
|
|
@ -5029,8 +5029,7 @@ cost_qual_eval_walker(Node *node, cost_qual_eval_context *context)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* recurse into children */
|
/* recurse into children */
|
||||||
return expression_tree_walker(node, cost_qual_eval_walker,
|
return expression_tree_walker(node, cost_qual_eval_walker, context);
|
||||||
(void *) context);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -2463,7 +2463,7 @@ match_eclass_clauses_to_index(PlannerInfo *root, IndexOptInfo *index,
|
||||||
clauses = generate_implied_equalities_for_column(root,
|
clauses = generate_implied_equalities_for_column(root,
|
||||||
index->rel,
|
index->rel,
|
||||||
ec_member_matches_indexcol,
|
ec_member_matches_indexcol,
|
||||||
(void *) &arg,
|
&arg,
|
||||||
index->rel->lateral_referencers);
|
index->rel->lateral_referencers);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -5037,9 +5037,7 @@ replace_nestloop_params_mutator(Node *node, PlannerInfo *root)
|
||||||
/* Replace the PlaceHolderVar with a nestloop Param */
|
/* Replace the PlaceHolderVar with a nestloop Param */
|
||||||
return (Node *) replace_nestloop_param_placeholdervar(root, phv);
|
return (Node *) replace_nestloop_param_placeholdervar(root, phv);
|
||||||
}
|
}
|
||||||
return expression_tree_mutator(node,
|
return expression_tree_mutator(node, replace_nestloop_params_mutator, root);
|
||||||
replace_nestloop_params_mutator,
|
|
||||||
(void *) root);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -485,7 +485,7 @@ flatten_unplanned_rtes(PlannerGlobal *glob, RangeTblEntry *rte)
|
||||||
/* Use query_tree_walker to find all RTEs in the parse tree */
|
/* Use query_tree_walker to find all RTEs in the parse tree */
|
||||||
(void) query_tree_walker(rte->subquery,
|
(void) query_tree_walker(rte->subquery,
|
||||||
flatten_rtes_walker,
|
flatten_rtes_walker,
|
||||||
(void *) &cxt,
|
&cxt,
|
||||||
QTW_EXAMINE_RTES_BEFORE);
|
QTW_EXAMINE_RTES_BEFORE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -516,13 +516,12 @@ flatten_rtes_walker(Node *node, flatten_rtes_walker_context *cxt)
|
||||||
cxt->query = (Query *) node;
|
cxt->query = (Query *) node;
|
||||||
result = query_tree_walker((Query *) node,
|
result = query_tree_walker((Query *) node,
|
||||||
flatten_rtes_walker,
|
flatten_rtes_walker,
|
||||||
(void *) cxt,
|
cxt,
|
||||||
QTW_EXAMINE_RTES_BEFORE);
|
QTW_EXAMINE_RTES_BEFORE);
|
||||||
cxt->query = save_query;
|
cxt->query = save_query;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
return expression_tree_walker(node, flatten_rtes_walker,
|
return expression_tree_walker(node, flatten_rtes_walker, cxt);
|
||||||
(void *) cxt);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -2243,8 +2242,7 @@ fix_scan_expr_mutator(Node *node, fix_scan_expr_context *context)
|
||||||
context->num_exec),
|
context->num_exec),
|
||||||
context);
|
context);
|
||||||
fix_expr_common(context->root, node);
|
fix_expr_common(context->root, node);
|
||||||
return expression_tree_mutator(node, fix_scan_expr_mutator,
|
return expression_tree_mutator(node, fix_scan_expr_mutator, context);
|
||||||
(void *) context);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
|
|
@ -2256,8 +2254,7 @@ fix_scan_expr_walker(Node *node, fix_scan_expr_context *context)
|
||||||
Assert(!IsA(node, PlaceHolderVar));
|
Assert(!IsA(node, PlaceHolderVar));
|
||||||
Assert(!IsA(node, AlternativeSubPlan));
|
Assert(!IsA(node, AlternativeSubPlan));
|
||||||
fix_expr_common(context->root, node);
|
fix_expr_common(context->root, node);
|
||||||
return expression_tree_walker(node, fix_scan_expr_walker,
|
return expression_tree_walker(node, fix_scan_expr_walker, context);
|
||||||
(void *) context);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -2612,8 +2609,7 @@ convert_combining_aggrefs(Node *node, void *context)
|
||||||
|
|
||||||
return (Node *) parent_agg;
|
return (Node *) parent_agg;
|
||||||
}
|
}
|
||||||
return expression_tree_mutator(node, convert_combining_aggrefs,
|
return expression_tree_mutator(node, convert_combining_aggrefs, context);
|
||||||
(void *) context);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -3165,9 +3161,7 @@ fix_join_expr_mutator(Node *node, fix_join_expr_context *context)
|
||||||
context->num_exec),
|
context->num_exec),
|
||||||
context);
|
context);
|
||||||
fix_expr_common(context->root, node);
|
fix_expr_common(context->root, node);
|
||||||
return expression_tree_mutator(node,
|
return expression_tree_mutator(node, fix_join_expr_mutator, context);
|
||||||
fix_join_expr_mutator,
|
|
||||||
(void *) context);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -3292,9 +3286,7 @@ fix_upper_expr_mutator(Node *node, fix_upper_expr_context *context)
|
||||||
context->num_exec),
|
context->num_exec),
|
||||||
context);
|
context);
|
||||||
fix_expr_common(context->root, node);
|
fix_expr_common(context->root, node);
|
||||||
return expression_tree_mutator(node,
|
return expression_tree_mutator(node, fix_upper_expr_mutator, context);
|
||||||
fix_upper_expr_mutator,
|
|
||||||
(void *) context);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -3390,7 +3382,7 @@ fix_windowagg_condition_expr_mutator(Node *node,
|
||||||
|
|
||||||
return expression_tree_mutator(node,
|
return expression_tree_mutator(node,
|
||||||
fix_windowagg_condition_expr_mutator,
|
fix_windowagg_condition_expr_mutator,
|
||||||
(void *) context);
|
context);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -3656,10 +3648,10 @@ extract_query_dependencies_walker(Node *node, PlannerInfo *context)
|
||||||
|
|
||||||
/* And recurse into the query's subexpressions */
|
/* And recurse into the query's subexpressions */
|
||||||
return query_tree_walker(query, extract_query_dependencies_walker,
|
return query_tree_walker(query, extract_query_dependencies_walker,
|
||||||
(void *) context, 0);
|
context, 0);
|
||||||
}
|
}
|
||||||
/* Extract function dependencies and check for regclass Consts */
|
/* Extract function dependencies and check for regclass Consts */
|
||||||
fix_expr_common(context, node);
|
fix_expr_common(context, node);
|
||||||
return expression_tree_walker(node, extract_query_dependencies_walker,
|
return expression_tree_walker(node, extract_query_dependencies_walker,
|
||||||
(void *) context);
|
context);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -697,9 +697,7 @@ convert_testexpr_mutator(Node *node,
|
||||||
*/
|
*/
|
||||||
return node;
|
return node;
|
||||||
}
|
}
|
||||||
return expression_tree_mutator(node,
|
return expression_tree_mutator(node, convert_testexpr_mutator, context);
|
||||||
convert_testexpr_mutator,
|
|
||||||
(void *) context);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -1121,14 +1119,13 @@ contain_outer_selfref_walker(Node *node, Index *depth)
|
||||||
(*depth)++;
|
(*depth)++;
|
||||||
|
|
||||||
result = query_tree_walker(query, contain_outer_selfref_walker,
|
result = query_tree_walker(query, contain_outer_selfref_walker,
|
||||||
(void *) depth, QTW_EXAMINE_RTES_BEFORE);
|
depth, QTW_EXAMINE_RTES_BEFORE);
|
||||||
|
|
||||||
(*depth)--;
|
(*depth)--;
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
return expression_tree_walker(node, contain_outer_selfref_walker,
|
return expression_tree_walker(node, contain_outer_selfref_walker, depth);
|
||||||
(void *) depth);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -1927,9 +1924,7 @@ replace_correlation_vars_mutator(Node *node, PlannerInfo *root)
|
||||||
return (Node *) replace_outer_merge_support(root,
|
return (Node *) replace_outer_merge_support(root,
|
||||||
(MergeSupportFunc *) node);
|
(MergeSupportFunc *) node);
|
||||||
}
|
}
|
||||||
return expression_tree_mutator(node,
|
return expression_tree_mutator(node, replace_correlation_vars_mutator, root);
|
||||||
replace_correlation_vars_mutator,
|
|
||||||
(void *) root);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -2077,7 +2072,7 @@ process_sublinks_mutator(Node *node, process_sublinks_context *context)
|
||||||
|
|
||||||
return expression_tree_mutator(node,
|
return expression_tree_mutator(node,
|
||||||
process_sublinks_mutator,
|
process_sublinks_mutator,
|
||||||
(void *) &locContext);
|
&locContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -2985,8 +2980,7 @@ finalize_primnode(Node *node, finalize_primnode_context *context)
|
||||||
|
|
||||||
return false; /* no more to do here */
|
return false; /* no more to do here */
|
||||||
}
|
}
|
||||||
return expression_tree_walker(node, finalize_primnode,
|
return expression_tree_walker(node, finalize_primnode, context);
|
||||||
(void *) context);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -3008,8 +3002,7 @@ finalize_agg_primnode(Node *node, finalize_primnode_context *context)
|
||||||
finalize_primnode((Node *) agg->aggfilter, context);
|
finalize_primnode((Node *) agg->aggfilter, context);
|
||||||
return false; /* there can't be any Aggrefs below here */
|
return false; /* there can't be any Aggrefs below here */
|
||||||
}
|
}
|
||||||
return expression_tree_walker(node, finalize_agg_primnode,
|
return expression_tree_walker(node, finalize_agg_primnode, context);
|
||||||
(void *) context);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -359,8 +359,7 @@ preprocess_aggrefs_walker(Node *node, PlannerInfo *root)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Assert(!IsA(node, SubLink));
|
Assert(!IsA(node, SubLink));
|
||||||
return expression_tree_walker(node, preprocess_aggrefs_walker,
|
return expression_tree_walker(node, preprocess_aggrefs_walker, root);
|
||||||
(void *) root);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2450,7 +2450,7 @@ pullup_replace_vars(Node *expr, pullup_replace_vars_context *context)
|
||||||
return replace_rte_variables(expr,
|
return replace_rte_variables(expr,
|
||||||
context->varno, 0,
|
context->varno, 0,
|
||||||
pullup_replace_vars_callback,
|
pullup_replace_vars_callback,
|
||||||
(void *) context,
|
context,
|
||||||
context->outer_hasSubLinks);
|
context->outer_hasSubLinks);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2707,7 +2707,7 @@ pullup_replace_vars_subquery(Query *query,
|
||||||
return (Query *) replace_rte_variables((Node *) query,
|
return (Query *) replace_rte_variables((Node *) query,
|
||||||
context->varno, 1,
|
context->varno, 1,
|
||||||
pullup_replace_vars_callback,
|
pullup_replace_vars_callback,
|
||||||
(void *) context,
|
context,
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3775,7 +3775,7 @@ find_dependent_phvs_walker(Node *node,
|
||||||
context->sublevels_up++;
|
context->sublevels_up++;
|
||||||
result = query_tree_walker((Query *) node,
|
result = query_tree_walker((Query *) node,
|
||||||
find_dependent_phvs_walker,
|
find_dependent_phvs_walker,
|
||||||
(void *) context, 0);
|
context, 0);
|
||||||
context->sublevels_up--;
|
context->sublevels_up--;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
@ -3784,8 +3784,7 @@ find_dependent_phvs_walker(Node *node,
|
||||||
Assert(!IsA(node, PlaceHolderInfo));
|
Assert(!IsA(node, PlaceHolderInfo));
|
||||||
Assert(!IsA(node, MinMaxAggInfo));
|
Assert(!IsA(node, MinMaxAggInfo));
|
||||||
|
|
||||||
return expression_tree_walker(node, find_dependent_phvs_walker,
|
return expression_tree_walker(node, find_dependent_phvs_walker, context);
|
||||||
(void *) context);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
|
|
@ -3800,15 +3799,12 @@ find_dependent_phvs(PlannerInfo *root, int varno)
|
||||||
context.relids = bms_make_singleton(varno);
|
context.relids = bms_make_singleton(varno);
|
||||||
context.sublevels_up = 0;
|
context.sublevels_up = 0;
|
||||||
|
|
||||||
if (query_tree_walker(root->parse,
|
if (query_tree_walker(root->parse, find_dependent_phvs_walker, &context, 0))
|
||||||
find_dependent_phvs_walker,
|
|
||||||
(void *) &context,
|
|
||||||
0))
|
|
||||||
return true;
|
return true;
|
||||||
/* The append_rel_list could be populated already, so check it too */
|
/* The append_rel_list could be populated already, so check it too */
|
||||||
if (expression_tree_walker((Node *) root->append_rel_list,
|
if (expression_tree_walker((Node *) root->append_rel_list,
|
||||||
find_dependent_phvs_walker,
|
find_dependent_phvs_walker,
|
||||||
(void *) &context))
|
&context))
|
||||||
return true;
|
return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -3847,10 +3843,7 @@ find_dependent_phvs_in_jointree(PlannerInfo *root, Node *node, int varno)
|
||||||
RangeTblEntry *rte = rt_fetch(relid, root->parse->rtable);
|
RangeTblEntry *rte = rt_fetch(relid, root->parse->rtable);
|
||||||
|
|
||||||
if (rte->lateral &&
|
if (rte->lateral &&
|
||||||
range_table_entry_walker(rte,
|
range_table_entry_walker(rte, find_dependent_phvs_walker, &context, 0))
|
||||||
find_dependent_phvs_walker,
|
|
||||||
(void *) &context,
|
|
||||||
0))
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3907,7 +3900,7 @@ substitute_phv_relids_walker(Node *node,
|
||||||
context->sublevels_up++;
|
context->sublevels_up++;
|
||||||
result = query_tree_walker((Query *) node,
|
result = query_tree_walker((Query *) node,
|
||||||
substitute_phv_relids_walker,
|
substitute_phv_relids_walker,
|
||||||
(void *) context, 0);
|
context, 0);
|
||||||
context->sublevels_up--;
|
context->sublevels_up--;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
@ -3917,8 +3910,7 @@ substitute_phv_relids_walker(Node *node,
|
||||||
Assert(!IsA(node, PlaceHolderInfo));
|
Assert(!IsA(node, PlaceHolderInfo));
|
||||||
Assert(!IsA(node, MinMaxAggInfo));
|
Assert(!IsA(node, MinMaxAggInfo));
|
||||||
|
|
||||||
return expression_tree_walker(node, substitute_phv_relids_walker,
|
return expression_tree_walker(node, substitute_phv_relids_walker, context);
|
||||||
(void *) context);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
@ -3935,7 +3927,7 @@ substitute_phv_relids(Node *node, int varno, Relids subrelids)
|
||||||
*/
|
*/
|
||||||
query_or_expression_tree_walker(node,
|
query_or_expression_tree_walker(node,
|
||||||
substitute_phv_relids_walker,
|
substitute_phv_relids_walker,
|
||||||
(void *) &context,
|
&context,
|
||||||
0);
|
0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -425,7 +425,7 @@ adjust_appendrel_attrs_mutator(Node *node,
|
||||||
|
|
||||||
phv = (PlaceHolderVar *) expression_tree_mutator(node,
|
phv = (PlaceHolderVar *) expression_tree_mutator(node,
|
||||||
adjust_appendrel_attrs_mutator,
|
adjust_appendrel_attrs_mutator,
|
||||||
(void *) context);
|
context);
|
||||||
/* now fix PlaceHolderVar's relid sets */
|
/* now fix PlaceHolderVar's relid sets */
|
||||||
if (phv->phlevelsup == 0)
|
if (phv->phlevelsup == 0)
|
||||||
{
|
{
|
||||||
|
|
@ -509,8 +509,7 @@ adjust_appendrel_attrs_mutator(Node *node,
|
||||||
Assert(!IsA(node, RangeTblRef));
|
Assert(!IsA(node, RangeTblRef));
|
||||||
Assert(!IsA(node, JoinExpr));
|
Assert(!IsA(node, JoinExpr));
|
||||||
|
|
||||||
return expression_tree_mutator(node, adjust_appendrel_attrs_mutator,
|
return expression_tree_mutator(node, adjust_appendrel_attrs_mutator, context);
|
||||||
(void *) context);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -265,8 +265,7 @@ find_window_functions_walker(Node *node, WindowFuncLists *lists)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Assert(!IsA(node, SubLink));
|
Assert(!IsA(node, SubLink));
|
||||||
return expression_tree_walker(node, find_window_functions_walker,
|
return expression_tree_walker(node, find_window_functions_walker, lists);
|
||||||
(void *) lists);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1217,7 +1216,7 @@ contain_context_dependent_node_walker(Node *node, int *flags)
|
||||||
*flags |= CCDN_CASETESTEXPR_OK;
|
*flags |= CCDN_CASETESTEXPR_OK;
|
||||||
res = expression_tree_walker(node,
|
res = expression_tree_walker(node,
|
||||||
contain_context_dependent_node_walker,
|
contain_context_dependent_node_walker,
|
||||||
(void *) flags);
|
flags);
|
||||||
*flags = save_flags;
|
*flags = save_flags;
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
@ -1241,7 +1240,7 @@ contain_context_dependent_node_walker(Node *node, int *flags)
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
return expression_tree_walker(node, contain_context_dependent_node_walker,
|
return expression_tree_walker(node, contain_context_dependent_node_walker,
|
||||||
(void *) flags);
|
flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
|
@ -2416,7 +2415,7 @@ estimate_expression_value(PlannerInfo *root, Node *node)
|
||||||
*/
|
*/
|
||||||
#define ece_generic_processing(node) \
|
#define ece_generic_processing(node) \
|
||||||
expression_tree_mutator((Node *) (node), eval_const_expressions_mutator, \
|
expression_tree_mutator((Node *) (node), eval_const_expressions_mutator, \
|
||||||
(void *) context)
|
context)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Check whether all arguments of the given node were reduced to Consts.
|
* Check whether all arguments of the given node were reduced to Consts.
|
||||||
|
|
@ -2552,7 +2551,7 @@ eval_const_expressions_mutator(Node *node,
|
||||||
args = (List *)
|
args = (List *)
|
||||||
expression_tree_mutator((Node *) args,
|
expression_tree_mutator((Node *) args,
|
||||||
eval_const_expressions_mutator,
|
eval_const_expressions_mutator,
|
||||||
(void *) context);
|
context);
|
||||||
/* ... and the filter expression, which isn't */
|
/* ... and the filter expression, which isn't */
|
||||||
aggfilter = (Expr *)
|
aggfilter = (Expr *)
|
||||||
eval_const_expressions_mutator((Node *) expr->aggfilter,
|
eval_const_expressions_mutator((Node *) expr->aggfilter,
|
||||||
|
|
@ -2697,7 +2696,7 @@ eval_const_expressions_mutator(Node *node,
|
||||||
*/
|
*/
|
||||||
args = (List *) expression_tree_mutator((Node *) expr->args,
|
args = (List *) expression_tree_mutator((Node *) expr->args,
|
||||||
eval_const_expressions_mutator,
|
eval_const_expressions_mutator,
|
||||||
(void *) context);
|
context);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We must do our own check for NULLs because DistinctExpr has
|
* We must do our own check for NULLs because DistinctExpr has
|
||||||
|
|
@ -4094,7 +4093,7 @@ simplify_function(Oid funcid, Oid result_type, int32 result_typmod,
|
||||||
args = expand_function_arguments(args, false, result_type, func_tuple);
|
args = expand_function_arguments(args, false, result_type, func_tuple);
|
||||||
args = (List *) expression_tree_mutator((Node *) args,
|
args = (List *) expression_tree_mutator((Node *) args,
|
||||||
eval_const_expressions_mutator,
|
eval_const_expressions_mutator,
|
||||||
(void *) context);
|
context);
|
||||||
/* Argument processing done, give it back to the caller */
|
/* Argument processing done, give it back to the caller */
|
||||||
*args_p = args;
|
*args_p = args;
|
||||||
}
|
}
|
||||||
|
|
@ -4636,7 +4635,7 @@ inline_function(Oid funcid, Oid result_type, Oid result_collid,
|
||||||
callback_arg.prosrc = src;
|
callback_arg.prosrc = src;
|
||||||
|
|
||||||
sqlerrcontext.callback = sql_inline_error_callback;
|
sqlerrcontext.callback = sql_inline_error_callback;
|
||||||
sqlerrcontext.arg = (void *) &callback_arg;
|
sqlerrcontext.arg = &callback_arg;
|
||||||
sqlerrcontext.previous = error_context_stack;
|
sqlerrcontext.previous = error_context_stack;
|
||||||
error_context_stack = &sqlerrcontext;
|
error_context_stack = &sqlerrcontext;
|
||||||
|
|
||||||
|
|
@ -4938,8 +4937,7 @@ substitute_actual_parameters_mutator(Node *node,
|
||||||
/* We don't need to copy at this time (it'll get done later) */
|
/* We don't need to copy at this time (it'll get done later) */
|
||||||
return list_nth(context->args, param->paramid - 1);
|
return list_nth(context->args, param->paramid - 1);
|
||||||
}
|
}
|
||||||
return expression_tree_mutator(node, substitute_actual_parameters_mutator,
|
return expression_tree_mutator(node, substitute_actual_parameters_mutator, context);
|
||||||
(void *) context);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -5190,7 +5188,7 @@ inline_set_returning_function(PlannerInfo *root, RangeTblEntry *rte)
|
||||||
callback_arg.prosrc = src;
|
callback_arg.prosrc = src;
|
||||||
|
|
||||||
sqlerrcontext.callback = sql_inline_error_callback;
|
sqlerrcontext.callback = sql_inline_error_callback;
|
||||||
sqlerrcontext.arg = (void *) &callback_arg;
|
sqlerrcontext.arg = &callback_arg;
|
||||||
sqlerrcontext.previous = error_context_stack;
|
sqlerrcontext.previous = error_context_stack;
|
||||||
error_context_stack = &sqlerrcontext;
|
error_context_stack = &sqlerrcontext;
|
||||||
|
|
||||||
|
|
@ -5382,7 +5380,7 @@ substitute_actual_srf_parameters_mutator(Node *node,
|
||||||
context->sublevels_up++;
|
context->sublevels_up++;
|
||||||
result = (Node *) query_tree_mutator((Query *) node,
|
result = (Node *) query_tree_mutator((Query *) node,
|
||||||
substitute_actual_srf_parameters_mutator,
|
substitute_actual_srf_parameters_mutator,
|
||||||
(void *) context,
|
context,
|
||||||
0);
|
0);
|
||||||
context->sublevels_up--;
|
context->sublevels_up--;
|
||||||
return result;
|
return result;
|
||||||
|
|
@ -5407,7 +5405,7 @@ substitute_actual_srf_parameters_mutator(Node *node,
|
||||||
}
|
}
|
||||||
return expression_tree_mutator(node,
|
return expression_tree_mutator(node,
|
||||||
substitute_actual_srf_parameters_mutator,
|
substitute_actual_srf_parameters_mutator,
|
||||||
(void *) context);
|
context);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -5436,6 +5434,5 @@ pull_paramids_walker(Node *node, Bitmapset **context)
|
||||||
*context = bms_add_member(*context, param->paramid);
|
*context = bms_add_member(*context, param->paramid);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return expression_tree_walker(node, pull_paramids_walker,
|
return expression_tree_walker(node, pull_paramids_walker, context);
|
||||||
(void *) context);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -908,7 +908,7 @@ static void
|
||||||
list_startup_fn(Node *clause, PredIterInfo info)
|
list_startup_fn(Node *clause, PredIterInfo info)
|
||||||
{
|
{
|
||||||
info->state_list = (List *) clause;
|
info->state_list = (List *) clause;
|
||||||
info->state = (void *) list_head(info->state_list);
|
info->state = list_head(info->state_list);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Node *
|
static Node *
|
||||||
|
|
@ -920,7 +920,7 @@ list_next_fn(PredIterInfo info)
|
||||||
if (l == NULL)
|
if (l == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
n = lfirst(l);
|
n = lfirst(l);
|
||||||
info->state = (void *) lnext(info->state_list, l);
|
info->state = lnext(info->state_list, l);
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -938,7 +938,7 @@ static void
|
||||||
boolexpr_startup_fn(Node *clause, PredIterInfo info)
|
boolexpr_startup_fn(Node *clause, PredIterInfo info)
|
||||||
{
|
{
|
||||||
info->state_list = ((BoolExpr *) clause)->args;
|
info->state_list = ((BoolExpr *) clause)->args;
|
||||||
info->state = (void *) list_head(info->state_list);
|
info->state = list_head(info->state_list);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -968,7 +968,7 @@ arrayconst_startup_fn(Node *clause, PredIterInfo info)
|
||||||
|
|
||||||
/* Create working state struct */
|
/* Create working state struct */
|
||||||
state = (ArrayConstIterState *) palloc(sizeof(ArrayConstIterState));
|
state = (ArrayConstIterState *) palloc(sizeof(ArrayConstIterState));
|
||||||
info->state = (void *) state;
|
info->state = state;
|
||||||
|
|
||||||
/* Deconstruct the array literal */
|
/* Deconstruct the array literal */
|
||||||
arrayconst = (Const *) lsecond(saop->args);
|
arrayconst = (Const *) lsecond(saop->args);
|
||||||
|
|
@ -1047,7 +1047,7 @@ arrayexpr_startup_fn(Node *clause, PredIterInfo info)
|
||||||
|
|
||||||
/* Create working state struct */
|
/* Create working state struct */
|
||||||
state = (ArrayExprIterState *) palloc(sizeof(ArrayExprIterState));
|
state = (ArrayExprIterState *) palloc(sizeof(ArrayExprIterState));
|
||||||
info->state = (void *) state;
|
info->state = state;
|
||||||
|
|
||||||
/* Set up a dummy OpExpr to return as the per-item node */
|
/* Set up a dummy OpExpr to return as the per-item node */
|
||||||
state->opexpr.xpr.type = T_OpExpr;
|
state->opexpr.xpr.type = T_OpExpr;
|
||||||
|
|
|
||||||
|
|
@ -1139,8 +1139,7 @@ split_pathtarget_walker(Node *node, split_pathtarget_context *context)
|
||||||
context->current_depth = 0;
|
context->current_depth = 0;
|
||||||
context->current_sgref = 0; /* subexpressions are not sortgroup items */
|
context->current_sgref = 0; /* subexpressions are not sortgroup items */
|
||||||
|
|
||||||
(void) expression_tree_walker(node, split_pathtarget_walker,
|
(void) expression_tree_walker(node, split_pathtarget_walker, context);
|
||||||
(void *) context);
|
|
||||||
|
|
||||||
/* Depth is one more than any SRF below it */
|
/* Depth is one more than any SRF below it */
|
||||||
srf_depth = context->current_depth + 1;
|
srf_depth = context->current_depth + 1;
|
||||||
|
|
@ -1181,8 +1180,7 @@ split_pathtarget_walker(Node *node, split_pathtarget_context *context)
|
||||||
* examine its inputs.
|
* examine its inputs.
|
||||||
*/
|
*/
|
||||||
context->current_sgref = 0; /* subexpressions are not sortgroup items */
|
context->current_sgref = 0; /* subexpressions are not sortgroup items */
|
||||||
return expression_tree_walker(node, split_pathtarget_walker,
|
return expression_tree_walker(node, split_pathtarget_walker, context);
|
||||||
(void *) context);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -124,7 +124,7 @@ pull_varnos(PlannerInfo *root, Node *node)
|
||||||
*/
|
*/
|
||||||
query_or_expression_tree_walker(node,
|
query_or_expression_tree_walker(node,
|
||||||
pull_varnos_walker,
|
pull_varnos_walker,
|
||||||
(void *) &context,
|
&context,
|
||||||
0);
|
0);
|
||||||
|
|
||||||
return context.varnos;
|
return context.varnos;
|
||||||
|
|
@ -150,7 +150,7 @@ pull_varnos_of_level(PlannerInfo *root, Node *node, int levelsup)
|
||||||
*/
|
*/
|
||||||
query_or_expression_tree_walker(node,
|
query_or_expression_tree_walker(node,
|
||||||
pull_varnos_walker,
|
pull_varnos_walker,
|
||||||
(void *) &context,
|
&context,
|
||||||
0);
|
0);
|
||||||
|
|
||||||
return context.varnos;
|
return context.varnos;
|
||||||
|
|
@ -269,12 +269,11 @@ pull_varnos_walker(Node *node, pull_varnos_context *context)
|
||||||
|
|
||||||
context->sublevels_up++;
|
context->sublevels_up++;
|
||||||
result = query_tree_walker((Query *) node, pull_varnos_walker,
|
result = query_tree_walker((Query *) node, pull_varnos_walker,
|
||||||
(void *) context, 0);
|
context, 0);
|
||||||
context->sublevels_up--;
|
context->sublevels_up--;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
return expression_tree_walker(node, pull_varnos_walker,
|
return expression_tree_walker(node, pull_varnos_walker, context);
|
||||||
(void *) context);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -324,8 +323,7 @@ pull_varattnos_walker(Node *node, pull_varattnos_context *context)
|
||||||
/* Should not find an unplanned subquery */
|
/* Should not find an unplanned subquery */
|
||||||
Assert(!IsA(node, Query));
|
Assert(!IsA(node, Query));
|
||||||
|
|
||||||
return expression_tree_walker(node, pull_varattnos_walker,
|
return expression_tree_walker(node, pull_varattnos_walker, context);
|
||||||
(void *) context);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -350,7 +348,7 @@ pull_vars_of_level(Node *node, int levelsup)
|
||||||
*/
|
*/
|
||||||
query_or_expression_tree_walker(node,
|
query_or_expression_tree_walker(node,
|
||||||
pull_vars_walker,
|
pull_vars_walker,
|
||||||
(void *) &context,
|
&context,
|
||||||
0);
|
0);
|
||||||
|
|
||||||
return context.vars;
|
return context.vars;
|
||||||
|
|
@ -385,12 +383,11 @@ pull_vars_walker(Node *node, pull_vars_context *context)
|
||||||
|
|
||||||
context->sublevels_up++;
|
context->sublevels_up++;
|
||||||
result = query_tree_walker((Query *) node, pull_vars_walker,
|
result = query_tree_walker((Query *) node, pull_vars_walker,
|
||||||
(void *) context, 0);
|
context, 0);
|
||||||
context->sublevels_up--;
|
context->sublevels_up--;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
return expression_tree_walker(node, pull_vars_walker,
|
return expression_tree_walker(node, pull_vars_walker, context);
|
||||||
(void *) context);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -449,7 +446,7 @@ contain_vars_of_level(Node *node, int levelsup)
|
||||||
|
|
||||||
return query_or_expression_tree_walker(node,
|
return query_or_expression_tree_walker(node,
|
||||||
contain_vars_of_level_walker,
|
contain_vars_of_level_walker,
|
||||||
(void *) &sublevels_up,
|
&sublevels_up,
|
||||||
0);
|
0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -484,14 +481,14 @@ contain_vars_of_level_walker(Node *node, int *sublevels_up)
|
||||||
(*sublevels_up)++;
|
(*sublevels_up)++;
|
||||||
result = query_tree_walker((Query *) node,
|
result = query_tree_walker((Query *) node,
|
||||||
contain_vars_of_level_walker,
|
contain_vars_of_level_walker,
|
||||||
(void *) sublevels_up,
|
sublevels_up,
|
||||||
0);
|
0);
|
||||||
(*sublevels_up)--;
|
(*sublevels_up)--;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
return expression_tree_walker(node,
|
return expression_tree_walker(node,
|
||||||
contain_vars_of_level_walker,
|
contain_vars_of_level_walker,
|
||||||
(void *) sublevels_up);
|
sublevels_up);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -520,7 +517,7 @@ locate_var_of_level(Node *node, int levelsup)
|
||||||
|
|
||||||
(void) query_or_expression_tree_walker(node,
|
(void) query_or_expression_tree_walker(node,
|
||||||
locate_var_of_level_walker,
|
locate_var_of_level_walker,
|
||||||
(void *) &context,
|
&context,
|
||||||
0);
|
0);
|
||||||
|
|
||||||
return context.var_location;
|
return context.var_location;
|
||||||
|
|
@ -558,14 +555,14 @@ locate_var_of_level_walker(Node *node,
|
||||||
context->sublevels_up++;
|
context->sublevels_up++;
|
||||||
result = query_tree_walker((Query *) node,
|
result = query_tree_walker((Query *) node,
|
||||||
locate_var_of_level_walker,
|
locate_var_of_level_walker,
|
||||||
(void *) context,
|
context,
|
||||||
0);
|
0);
|
||||||
context->sublevels_up--;
|
context->sublevels_up--;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
return expression_tree_walker(node,
|
return expression_tree_walker(node,
|
||||||
locate_var_of_level_walker,
|
locate_var_of_level_walker,
|
||||||
(void *) context);
|
context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -707,8 +704,7 @@ pull_var_clause_walker(Node *node, pull_var_clause_context *context)
|
||||||
else
|
else
|
||||||
elog(ERROR, "PlaceHolderVar found where not expected");
|
elog(ERROR, "PlaceHolderVar found where not expected");
|
||||||
}
|
}
|
||||||
return expression_tree_walker(node, pull_var_clause_walker,
|
return expression_tree_walker(node, pull_var_clause_walker, context);
|
||||||
(void *) context);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -867,7 +863,7 @@ flatten_join_alias_vars_mutator(Node *node,
|
||||||
|
|
||||||
phv = (PlaceHolderVar *) expression_tree_mutator(node,
|
phv = (PlaceHolderVar *) expression_tree_mutator(node,
|
||||||
flatten_join_alias_vars_mutator,
|
flatten_join_alias_vars_mutator,
|
||||||
(void *) context);
|
context);
|
||||||
/* now fix PlaceHolderVar's relid sets */
|
/* now fix PlaceHolderVar's relid sets */
|
||||||
if (phv->phlevelsup == context->sublevels_up)
|
if (phv->phlevelsup == context->sublevels_up)
|
||||||
{
|
{
|
||||||
|
|
@ -889,7 +885,7 @@ flatten_join_alias_vars_mutator(Node *node,
|
||||||
context->inserted_sublink = ((Query *) node)->hasSubLinks;
|
context->inserted_sublink = ((Query *) node)->hasSubLinks;
|
||||||
newnode = query_tree_mutator((Query *) node,
|
newnode = query_tree_mutator((Query *) node,
|
||||||
flatten_join_alias_vars_mutator,
|
flatten_join_alias_vars_mutator,
|
||||||
(void *) context,
|
context,
|
||||||
QTW_IGNORE_JOINALIASES);
|
QTW_IGNORE_JOINALIASES);
|
||||||
newnode->hasSubLinks |= context->inserted_sublink;
|
newnode->hasSubLinks |= context->inserted_sublink;
|
||||||
context->inserted_sublink = save_inserted_sublink;
|
context->inserted_sublink = save_inserted_sublink;
|
||||||
|
|
@ -904,8 +900,7 @@ flatten_join_alias_vars_mutator(Node *node,
|
||||||
Assert(!IsA(node, PlaceHolderInfo));
|
Assert(!IsA(node, PlaceHolderInfo));
|
||||||
Assert(!IsA(node, MinMaxAggInfo));
|
Assert(!IsA(node, MinMaxAggInfo));
|
||||||
|
|
||||||
return expression_tree_mutator(node, flatten_join_alias_vars_mutator,
|
return expression_tree_mutator(node, flatten_join_alias_vars_mutator, context);
|
||||||
(void *) context);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -1044,7 +1039,7 @@ flatten_group_exprs_mutator(Node *node,
|
||||||
context->inserted_sublink = ((Query *) node)->hasSubLinks;
|
context->inserted_sublink = ((Query *) node)->hasSubLinks;
|
||||||
newnode = query_tree_mutator((Query *) node,
|
newnode = query_tree_mutator((Query *) node,
|
||||||
flatten_group_exprs_mutator,
|
flatten_group_exprs_mutator,
|
||||||
(void *) context,
|
context,
|
||||||
QTW_IGNORE_GROUPEXPRS);
|
QTW_IGNORE_GROUPEXPRS);
|
||||||
newnode->hasSubLinks |= context->inserted_sublink;
|
newnode->hasSubLinks |= context->inserted_sublink;
|
||||||
context->inserted_sublink = save_inserted_sublink;
|
context->inserted_sublink = save_inserted_sublink;
|
||||||
|
|
@ -1053,7 +1048,7 @@ flatten_group_exprs_mutator(Node *node,
|
||||||
}
|
}
|
||||||
|
|
||||||
return expression_tree_mutator(node, flatten_group_exprs_mutator,
|
return expression_tree_mutator(node, flatten_group_exprs_mutator,
|
||||||
(void *) context);
|
context);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -1687,7 +1687,7 @@ transformValuesClause(ParseState *pstate, SelectStmt *stmt)
|
||||||
Node *col = (Node *) lfirst(lc);
|
Node *col = (Node *) lfirst(lc);
|
||||||
|
|
||||||
col = coerce_to_common_type(pstate, col, coltype, "VALUES");
|
col = coerce_to_common_type(pstate, col, coltype, "VALUES");
|
||||||
lfirst(lc) = (void *) col;
|
lfirst(lc) = col;
|
||||||
}
|
}
|
||||||
|
|
||||||
coltypmod = select_common_typmod(pstate, colexprs[i], coltype);
|
coltypmod = select_common_typmod(pstate, colexprs[i], coltype);
|
||||||
|
|
|
||||||
|
|
@ -799,7 +799,7 @@ check_agg_arguments_walker(Node *node,
|
||||||
context->sublevels_up++;
|
context->sublevels_up++;
|
||||||
result = query_tree_walker((Query *) node,
|
result = query_tree_walker((Query *) node,
|
||||||
check_agg_arguments_walker,
|
check_agg_arguments_walker,
|
||||||
(void *) context,
|
context,
|
||||||
0);
|
0);
|
||||||
context->sublevels_up--;
|
context->sublevels_up--;
|
||||||
return result;
|
return result;
|
||||||
|
|
@ -807,7 +807,7 @@ check_agg_arguments_walker(Node *node,
|
||||||
|
|
||||||
return expression_tree_walker(node,
|
return expression_tree_walker(node,
|
||||||
check_agg_arguments_walker,
|
check_agg_arguments_walker,
|
||||||
(void *) context);
|
context);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -1517,13 +1517,13 @@ substitute_grouped_columns_mutator(Node *node,
|
||||||
context->sublevels_up++;
|
context->sublevels_up++;
|
||||||
newnode = query_tree_mutator((Query *) node,
|
newnode = query_tree_mutator((Query *) node,
|
||||||
substitute_grouped_columns_mutator,
|
substitute_grouped_columns_mutator,
|
||||||
(void *) context,
|
context,
|
||||||
0);
|
0);
|
||||||
context->sublevels_up--;
|
context->sublevels_up--;
|
||||||
return (Node *) newnode;
|
return (Node *) newnode;
|
||||||
}
|
}
|
||||||
return expression_tree_mutator(node, substitute_grouped_columns_mutator,
|
return expression_tree_mutator(node, substitute_grouped_columns_mutator,
|
||||||
(void *) context);
|
context);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -1691,13 +1691,13 @@ finalize_grouping_exprs_walker(Node *node,
|
||||||
context->sublevels_up++;
|
context->sublevels_up++;
|
||||||
result = query_tree_walker((Query *) node,
|
result = query_tree_walker((Query *) node,
|
||||||
finalize_grouping_exprs_walker,
|
finalize_grouping_exprs_walker,
|
||||||
(void *) context,
|
context,
|
||||||
0);
|
0);
|
||||||
context->sublevels_up--;
|
context->sublevels_up--;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
return expression_tree_walker(node, finalize_grouping_exprs_walker,
|
return expression_tree_walker(node, finalize_grouping_exprs_walker,
|
||||||
(void *) context);
|
context);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -108,7 +108,7 @@ assign_query_collations(ParseState *pstate, Query *query)
|
||||||
*/
|
*/
|
||||||
(void) query_tree_walker(query,
|
(void) query_tree_walker(query,
|
||||||
assign_query_collations_walker,
|
assign_query_collations_walker,
|
||||||
(void *) pstate,
|
pstate,
|
||||||
QTW_IGNORE_RANGE_TABLE |
|
QTW_IGNORE_RANGE_TABLE |
|
||||||
QTW_IGNORE_CTE_SUBQUERIES);
|
QTW_IGNORE_CTE_SUBQUERIES);
|
||||||
}
|
}
|
||||||
|
|
@ -295,7 +295,7 @@ assign_collations_walker(Node *node, assign_collations_context *context)
|
||||||
|
|
||||||
(void) expression_tree_walker(node,
|
(void) expression_tree_walker(node,
|
||||||
assign_collations_walker,
|
assign_collations_walker,
|
||||||
(void *) &loccontext);
|
&loccontext);
|
||||||
|
|
||||||
collation = expr->collOid;
|
collation = expr->collOid;
|
||||||
Assert(OidIsValid(collation));
|
Assert(OidIsValid(collation));
|
||||||
|
|
@ -317,7 +317,7 @@ assign_collations_walker(Node *node, assign_collations_context *context)
|
||||||
/* ... but first, recurse */
|
/* ... but first, recurse */
|
||||||
(void) expression_tree_walker(node,
|
(void) expression_tree_walker(node,
|
||||||
assign_collations_walker,
|
assign_collations_walker,
|
||||||
(void *) &loccontext);
|
&loccontext);
|
||||||
|
|
||||||
if (OidIsValid(expr->resultcollid))
|
if (OidIsValid(expr->resultcollid))
|
||||||
{
|
{
|
||||||
|
|
@ -403,7 +403,7 @@ assign_collations_walker(Node *node, assign_collations_context *context)
|
||||||
/* ... but first, recurse */
|
/* ... but first, recurse */
|
||||||
(void) expression_tree_walker(node,
|
(void) expression_tree_walker(node,
|
||||||
assign_collations_walker,
|
assign_collations_walker,
|
||||||
(void *) &loccontext);
|
&loccontext);
|
||||||
|
|
||||||
if (OidIsValid(typcollation))
|
if (OidIsValid(typcollation))
|
||||||
{
|
{
|
||||||
|
|
@ -444,7 +444,7 @@ assign_collations_walker(Node *node, assign_collations_context *context)
|
||||||
case T_TargetEntry:
|
case T_TargetEntry:
|
||||||
(void) expression_tree_walker(node,
|
(void) expression_tree_walker(node,
|
||||||
assign_collations_walker,
|
assign_collations_walker,
|
||||||
(void *) &loccontext);
|
&loccontext);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* TargetEntry can have only one child, and should bubble that
|
* TargetEntry can have only one child, and should bubble that
|
||||||
|
|
@ -488,7 +488,7 @@ assign_collations_walker(Node *node, assign_collations_context *context)
|
||||||
case T_MergeAction:
|
case T_MergeAction:
|
||||||
(void) expression_tree_walker(node,
|
(void) expression_tree_walker(node,
|
||||||
assign_collations_walker,
|
assign_collations_walker,
|
||||||
(void *) &loccontext);
|
&loccontext);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* When we're invoked on a query's jointree, we don't need to do
|
* When we're invoked on a query's jointree, we don't need to do
|
||||||
|
|
@ -528,7 +528,7 @@ assign_collations_walker(Node *node, assign_collations_context *context)
|
||||||
case T_List:
|
case T_List:
|
||||||
(void) expression_tree_walker(node,
|
(void) expression_tree_walker(node,
|
||||||
assign_collations_walker,
|
assign_collations_walker,
|
||||||
(void *) &loccontext);
|
&loccontext);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* When processing a list, collation state just bubbles up from
|
* When processing a list, collation state just bubbles up from
|
||||||
|
|
@ -699,7 +699,7 @@ assign_collations_walker(Node *node, assign_collations_context *context)
|
||||||
*/
|
*/
|
||||||
(void) expression_tree_walker(node,
|
(void) expression_tree_walker(node,
|
||||||
assign_collations_walker,
|
assign_collations_walker,
|
||||||
(void *) &loccontext);
|
&loccontext);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -746,7 +746,7 @@ makeDependencyGraphWalker(Node *node, CteState *cstate)
|
||||||
}
|
}
|
||||||
(void) raw_expression_tree_walker(node,
|
(void) raw_expression_tree_walker(node,
|
||||||
makeDependencyGraphWalker,
|
makeDependencyGraphWalker,
|
||||||
(void *) cstate);
|
cstate);
|
||||||
cstate->innerwiths = list_delete_first(cstate->innerwiths);
|
cstate->innerwiths = list_delete_first(cstate->innerwiths);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -768,7 +768,7 @@ makeDependencyGraphWalker(Node *node, CteState *cstate)
|
||||||
}
|
}
|
||||||
(void) raw_expression_tree_walker(node,
|
(void) raw_expression_tree_walker(node,
|
||||||
makeDependencyGraphWalker,
|
makeDependencyGraphWalker,
|
||||||
(void *) cstate);
|
cstate);
|
||||||
cstate->innerwiths = list_delete_first(cstate->innerwiths);
|
cstate->innerwiths = list_delete_first(cstate->innerwiths);
|
||||||
}
|
}
|
||||||
/* We're done examining the SelectStmt */
|
/* We're done examining the SelectStmt */
|
||||||
|
|
@ -787,7 +787,7 @@ makeDependencyGraphWalker(Node *node, CteState *cstate)
|
||||||
}
|
}
|
||||||
return raw_expression_tree_walker(node,
|
return raw_expression_tree_walker(node,
|
||||||
makeDependencyGraphWalker,
|
makeDependencyGraphWalker,
|
||||||
(void *) cstate);
|
cstate);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -1130,7 +1130,7 @@ checkWellFormedRecursionWalker(Node *node, CteState *cstate)
|
||||||
}
|
}
|
||||||
return raw_expression_tree_walker(node,
|
return raw_expression_tree_walker(node,
|
||||||
checkWellFormedRecursionWalker,
|
checkWellFormedRecursionWalker,
|
||||||
(void *) cstate);
|
cstate);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -1147,7 +1147,7 @@ checkWellFormedSelectStmt(SelectStmt *stmt, CteState *cstate)
|
||||||
/* just recurse without changing state */
|
/* just recurse without changing state */
|
||||||
raw_expression_tree_walker((Node *) stmt,
|
raw_expression_tree_walker((Node *) stmt,
|
||||||
checkWellFormedRecursionWalker,
|
checkWellFormedRecursionWalker,
|
||||||
(void *) cstate);
|
cstate);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -1157,7 +1157,7 @@ checkWellFormedSelectStmt(SelectStmt *stmt, CteState *cstate)
|
||||||
case SETOP_UNION:
|
case SETOP_UNION:
|
||||||
raw_expression_tree_walker((Node *) stmt,
|
raw_expression_tree_walker((Node *) stmt,
|
||||||
checkWellFormedRecursionWalker,
|
checkWellFormedRecursionWalker,
|
||||||
(void *) cstate);
|
cstate);
|
||||||
break;
|
break;
|
||||||
case SETOP_INTERSECT:
|
case SETOP_INTERSECT:
|
||||||
if (stmt->all)
|
if (stmt->all)
|
||||||
|
|
|
||||||
|
|
@ -144,7 +144,7 @@ setup_parser_errposition_callback(ParseCallbackState *pcbstate,
|
||||||
pcbstate->pstate = pstate;
|
pcbstate->pstate = pstate;
|
||||||
pcbstate->location = location;
|
pcbstate->location = location;
|
||||||
pcbstate->errcallback.callback = pcb_error_callback;
|
pcbstate->errcallback.callback = pcb_error_callback;
|
||||||
pcbstate->errcallback.arg = (void *) pcbstate;
|
pcbstate->errcallback.arg = pcbstate;
|
||||||
pcbstate->errcallback.previous = error_context_stack;
|
pcbstate->errcallback.previous = error_context_stack;
|
||||||
error_context_stack = &pcbstate->errcallback;
|
error_context_stack = &pcbstate->errcallback;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,7 @@ setup_parse_fixed_parameters(ParseState *pstate,
|
||||||
|
|
||||||
parstate->paramTypes = paramTypes;
|
parstate->paramTypes = paramTypes;
|
||||||
parstate->numParams = numParams;
|
parstate->numParams = numParams;
|
||||||
pstate->p_ref_hook_state = (void *) parstate;
|
pstate->p_ref_hook_state = parstate;
|
||||||
pstate->p_paramref_hook = fixed_paramref_hook;
|
pstate->p_paramref_hook = fixed_paramref_hook;
|
||||||
/* no need to use p_coerce_param_hook */
|
/* no need to use p_coerce_param_hook */
|
||||||
}
|
}
|
||||||
|
|
@ -88,7 +88,7 @@ setup_parse_variable_parameters(ParseState *pstate,
|
||||||
|
|
||||||
parstate->paramTypes = paramTypes;
|
parstate->paramTypes = paramTypes;
|
||||||
parstate->numParams = numParams;
|
parstate->numParams = numParams;
|
||||||
pstate->p_ref_hook_state = (void *) parstate;
|
pstate->p_ref_hook_state = parstate;
|
||||||
pstate->p_paramref_hook = variable_paramref_hook;
|
pstate->p_paramref_hook = variable_paramref_hook;
|
||||||
pstate->p_coerce_param_hook = variable_coerce_param_hook;
|
pstate->p_coerce_param_hook = variable_coerce_param_hook;
|
||||||
}
|
}
|
||||||
|
|
@ -274,7 +274,7 @@ check_variable_parameters(ParseState *pstate, Query *query)
|
||||||
if (*parstate->numParams > 0)
|
if (*parstate->numParams > 0)
|
||||||
(void) query_tree_walker(query,
|
(void) query_tree_walker(query,
|
||||||
check_parameter_resolution_walker,
|
check_parameter_resolution_walker,
|
||||||
(void *) pstate, 0);
|
pstate, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -318,10 +318,10 @@ check_parameter_resolution_walker(Node *node, ParseState *pstate)
|
||||||
/* Recurse into RTE subquery or not-yet-planned sublink subquery */
|
/* Recurse into RTE subquery or not-yet-planned sublink subquery */
|
||||||
return query_tree_walker((Query *) node,
|
return query_tree_walker((Query *) node,
|
||||||
check_parameter_resolution_walker,
|
check_parameter_resolution_walker,
|
||||||
(void *) pstate, 0);
|
pstate, 0);
|
||||||
}
|
}
|
||||||
return expression_tree_walker(node, check_parameter_resolution_walker,
|
return expression_tree_walker(node, check_parameter_resolution_walker,
|
||||||
(void *) pstate);
|
pstate);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -1205,7 +1205,7 @@ setup_scanner_errposition_callback(ScannerCallbackState *scbstate,
|
||||||
scbstate->yyscanner = yyscanner;
|
scbstate->yyscanner = yyscanner;
|
||||||
scbstate->location = location;
|
scbstate->location = location;
|
||||||
scbstate->errcallback.callback = scb_error_callback;
|
scbstate->errcallback.callback = scb_error_callback;
|
||||||
scbstate->errcallback.arg = (void *) scbstate;
|
scbstate->errcallback.arg = scbstate;
|
||||||
scbstate->errcallback.previous = error_context_stack;
|
scbstate->errcallback.previous = error_context_stack;
|
||||||
error_context_stack = &scbstate->errcallback;
|
error_context_stack = &scbstate->errcallback;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3365,8 +3365,7 @@ pull_exec_paramids_walker(Node *node, Bitmapset **context)
|
||||||
*context = bms_add_member(*context, param->paramid);
|
*context = bms_add_member(*context, param->paramid);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return expression_tree_walker(node, pull_exec_paramids_walker,
|
return expression_tree_walker(node, pull_exec_paramids_walker, context);
|
||||||
(void *) context);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -286,7 +286,7 @@ static void
|
||||||
IpcMemoryDetach(int status, Datum shmaddr)
|
IpcMemoryDetach(int status, Datum shmaddr)
|
||||||
{
|
{
|
||||||
/* Detach System V shared memory block. */
|
/* Detach System V shared memory block. */
|
||||||
if (shmdt((void *) DatumGetPointer(shmaddr)) < 0)
|
if (shmdt(DatumGetPointer(shmaddr)) < 0)
|
||||||
elog(LOG, "shmdt(%p) failed: %m", DatumGetPointer(shmaddr));
|
elog(LOG, "shmdt(%p) failed: %m", DatumGetPointer(shmaddr));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -320,7 +320,7 @@ PGSharedMemoryIsInUse(unsigned long id1, unsigned long id2)
|
||||||
IpcMemoryState state;
|
IpcMemoryState state;
|
||||||
|
|
||||||
state = PGSharedMemoryAttach((IpcMemoryId) id2, NULL, &memAddress);
|
state = PGSharedMemoryAttach((IpcMemoryId) id2, NULL, &memAddress);
|
||||||
if (memAddress && shmdt((void *) memAddress) < 0)
|
if (memAddress && shmdt(memAddress) < 0)
|
||||||
elog(LOG, "shmdt(%p) failed: %m", memAddress);
|
elog(LOG, "shmdt(%p) failed: %m", memAddress);
|
||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
|
|
@ -835,7 +835,7 @@ PGSharedMemoryCreate(Size size,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (oldhdr && shmdt((void *) oldhdr) < 0)
|
if (oldhdr && shmdt(oldhdr) < 0)
|
||||||
elog(LOG, "shmdt(%p) failed: %m", oldhdr);
|
elog(LOG, "shmdt(%p) failed: %m", oldhdr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -800,7 +800,7 @@ startup_cb_wrapper(LogicalDecodingContext *ctx, OutputPluginOptions *opt, bool i
|
||||||
state.callback_name = "startup";
|
state.callback_name = "startup";
|
||||||
state.report_location = InvalidXLogRecPtr;
|
state.report_location = InvalidXLogRecPtr;
|
||||||
errcallback.callback = output_plugin_error_callback;
|
errcallback.callback = output_plugin_error_callback;
|
||||||
errcallback.arg = (void *) &state;
|
errcallback.arg = &state;
|
||||||
errcallback.previous = error_context_stack;
|
errcallback.previous = error_context_stack;
|
||||||
error_context_stack = &errcallback;
|
error_context_stack = &errcallback;
|
||||||
|
|
||||||
|
|
@ -828,7 +828,7 @@ shutdown_cb_wrapper(LogicalDecodingContext *ctx)
|
||||||
state.callback_name = "shutdown";
|
state.callback_name = "shutdown";
|
||||||
state.report_location = InvalidXLogRecPtr;
|
state.report_location = InvalidXLogRecPtr;
|
||||||
errcallback.callback = output_plugin_error_callback;
|
errcallback.callback = output_plugin_error_callback;
|
||||||
errcallback.arg = (void *) &state;
|
errcallback.arg = &state;
|
||||||
errcallback.previous = error_context_stack;
|
errcallback.previous = error_context_stack;
|
||||||
error_context_stack = &errcallback;
|
error_context_stack = &errcallback;
|
||||||
|
|
||||||
|
|
@ -862,7 +862,7 @@ begin_cb_wrapper(ReorderBuffer *cache, ReorderBufferTXN *txn)
|
||||||
state.callback_name = "begin";
|
state.callback_name = "begin";
|
||||||
state.report_location = txn->first_lsn;
|
state.report_location = txn->first_lsn;
|
||||||
errcallback.callback = output_plugin_error_callback;
|
errcallback.callback = output_plugin_error_callback;
|
||||||
errcallback.arg = (void *) &state;
|
errcallback.arg = &state;
|
||||||
errcallback.previous = error_context_stack;
|
errcallback.previous = error_context_stack;
|
||||||
error_context_stack = &errcallback;
|
error_context_stack = &errcallback;
|
||||||
|
|
||||||
|
|
@ -894,7 +894,7 @@ commit_cb_wrapper(ReorderBuffer *cache, ReorderBufferTXN *txn,
|
||||||
state.callback_name = "commit";
|
state.callback_name = "commit";
|
||||||
state.report_location = txn->final_lsn; /* beginning of commit record */
|
state.report_location = txn->final_lsn; /* beginning of commit record */
|
||||||
errcallback.callback = output_plugin_error_callback;
|
errcallback.callback = output_plugin_error_callback;
|
||||||
errcallback.arg = (void *) &state;
|
errcallback.arg = &state;
|
||||||
errcallback.previous = error_context_stack;
|
errcallback.previous = error_context_stack;
|
||||||
error_context_stack = &errcallback;
|
error_context_stack = &errcallback;
|
||||||
|
|
||||||
|
|
@ -935,7 +935,7 @@ begin_prepare_cb_wrapper(ReorderBuffer *cache, ReorderBufferTXN *txn)
|
||||||
state.callback_name = "begin_prepare";
|
state.callback_name = "begin_prepare";
|
||||||
state.report_location = txn->first_lsn;
|
state.report_location = txn->first_lsn;
|
||||||
errcallback.callback = output_plugin_error_callback;
|
errcallback.callback = output_plugin_error_callback;
|
||||||
errcallback.arg = (void *) &state;
|
errcallback.arg = &state;
|
||||||
errcallback.previous = error_context_stack;
|
errcallback.previous = error_context_stack;
|
||||||
error_context_stack = &errcallback;
|
error_context_stack = &errcallback;
|
||||||
|
|
||||||
|
|
@ -980,7 +980,7 @@ prepare_cb_wrapper(ReorderBuffer *cache, ReorderBufferTXN *txn,
|
||||||
state.callback_name = "prepare";
|
state.callback_name = "prepare";
|
||||||
state.report_location = txn->final_lsn; /* beginning of prepare record */
|
state.report_location = txn->final_lsn; /* beginning of prepare record */
|
||||||
errcallback.callback = output_plugin_error_callback;
|
errcallback.callback = output_plugin_error_callback;
|
||||||
errcallback.arg = (void *) &state;
|
errcallback.arg = &state;
|
||||||
errcallback.previous = error_context_stack;
|
errcallback.previous = error_context_stack;
|
||||||
error_context_stack = &errcallback;
|
error_context_stack = &errcallback;
|
||||||
|
|
||||||
|
|
@ -1025,7 +1025,7 @@ commit_prepared_cb_wrapper(ReorderBuffer *cache, ReorderBufferTXN *txn,
|
||||||
state.callback_name = "commit_prepared";
|
state.callback_name = "commit_prepared";
|
||||||
state.report_location = txn->final_lsn; /* beginning of commit record */
|
state.report_location = txn->final_lsn; /* beginning of commit record */
|
||||||
errcallback.callback = output_plugin_error_callback;
|
errcallback.callback = output_plugin_error_callback;
|
||||||
errcallback.arg = (void *) &state;
|
errcallback.arg = &state;
|
||||||
errcallback.previous = error_context_stack;
|
errcallback.previous = error_context_stack;
|
||||||
error_context_stack = &errcallback;
|
error_context_stack = &errcallback;
|
||||||
|
|
||||||
|
|
@ -1071,7 +1071,7 @@ rollback_prepared_cb_wrapper(ReorderBuffer *cache, ReorderBufferTXN *txn,
|
||||||
state.callback_name = "rollback_prepared";
|
state.callback_name = "rollback_prepared";
|
||||||
state.report_location = txn->final_lsn; /* beginning of commit record */
|
state.report_location = txn->final_lsn; /* beginning of commit record */
|
||||||
errcallback.callback = output_plugin_error_callback;
|
errcallback.callback = output_plugin_error_callback;
|
||||||
errcallback.arg = (void *) &state;
|
errcallback.arg = &state;
|
||||||
errcallback.previous = error_context_stack;
|
errcallback.previous = error_context_stack;
|
||||||
error_context_stack = &errcallback;
|
error_context_stack = &errcallback;
|
||||||
|
|
||||||
|
|
@ -1114,7 +1114,7 @@ change_cb_wrapper(ReorderBuffer *cache, ReorderBufferTXN *txn,
|
||||||
state.callback_name = "change";
|
state.callback_name = "change";
|
||||||
state.report_location = change->lsn;
|
state.report_location = change->lsn;
|
||||||
errcallback.callback = output_plugin_error_callback;
|
errcallback.callback = output_plugin_error_callback;
|
||||||
errcallback.arg = (void *) &state;
|
errcallback.arg = &state;
|
||||||
errcallback.previous = error_context_stack;
|
errcallback.previous = error_context_stack;
|
||||||
error_context_stack = &errcallback;
|
error_context_stack = &errcallback;
|
||||||
|
|
||||||
|
|
@ -1156,7 +1156,7 @@ truncate_cb_wrapper(ReorderBuffer *cache, ReorderBufferTXN *txn,
|
||||||
state.callback_name = "truncate";
|
state.callback_name = "truncate";
|
||||||
state.report_location = change->lsn;
|
state.report_location = change->lsn;
|
||||||
errcallback.callback = output_plugin_error_callback;
|
errcallback.callback = output_plugin_error_callback;
|
||||||
errcallback.arg = (void *) &state;
|
errcallback.arg = &state;
|
||||||
errcallback.previous = error_context_stack;
|
errcallback.previous = error_context_stack;
|
||||||
error_context_stack = &errcallback;
|
error_context_stack = &errcallback;
|
||||||
|
|
||||||
|
|
@ -1195,7 +1195,7 @@ filter_prepare_cb_wrapper(LogicalDecodingContext *ctx, TransactionId xid,
|
||||||
state.callback_name = "filter_prepare";
|
state.callback_name = "filter_prepare";
|
||||||
state.report_location = InvalidXLogRecPtr;
|
state.report_location = InvalidXLogRecPtr;
|
||||||
errcallback.callback = output_plugin_error_callback;
|
errcallback.callback = output_plugin_error_callback;
|
||||||
errcallback.arg = (void *) &state;
|
errcallback.arg = &state;
|
||||||
errcallback.previous = error_context_stack;
|
errcallback.previous = error_context_stack;
|
||||||
error_context_stack = &errcallback;
|
error_context_stack = &errcallback;
|
||||||
|
|
||||||
|
|
@ -1226,7 +1226,7 @@ filter_by_origin_cb_wrapper(LogicalDecodingContext *ctx, RepOriginId origin_id)
|
||||||
state.callback_name = "filter_by_origin";
|
state.callback_name = "filter_by_origin";
|
||||||
state.report_location = InvalidXLogRecPtr;
|
state.report_location = InvalidXLogRecPtr;
|
||||||
errcallback.callback = output_plugin_error_callback;
|
errcallback.callback = output_plugin_error_callback;
|
||||||
errcallback.arg = (void *) &state;
|
errcallback.arg = &state;
|
||||||
errcallback.previous = error_context_stack;
|
errcallback.previous = error_context_stack;
|
||||||
error_context_stack = &errcallback;
|
error_context_stack = &errcallback;
|
||||||
|
|
||||||
|
|
@ -1262,7 +1262,7 @@ message_cb_wrapper(ReorderBuffer *cache, ReorderBufferTXN *txn,
|
||||||
state.callback_name = "message";
|
state.callback_name = "message";
|
||||||
state.report_location = message_lsn;
|
state.report_location = message_lsn;
|
||||||
errcallback.callback = output_plugin_error_callback;
|
errcallback.callback = output_plugin_error_callback;
|
||||||
errcallback.arg = (void *) &state;
|
errcallback.arg = &state;
|
||||||
errcallback.previous = error_context_stack;
|
errcallback.previous = error_context_stack;
|
||||||
error_context_stack = &errcallback;
|
error_context_stack = &errcallback;
|
||||||
|
|
||||||
|
|
@ -1298,7 +1298,7 @@ stream_start_cb_wrapper(ReorderBuffer *cache, ReorderBufferTXN *txn,
|
||||||
state.callback_name = "stream_start";
|
state.callback_name = "stream_start";
|
||||||
state.report_location = first_lsn;
|
state.report_location = first_lsn;
|
||||||
errcallback.callback = output_plugin_error_callback;
|
errcallback.callback = output_plugin_error_callback;
|
||||||
errcallback.arg = (void *) &state;
|
errcallback.arg = &state;
|
||||||
errcallback.previous = error_context_stack;
|
errcallback.previous = error_context_stack;
|
||||||
error_context_stack = &errcallback;
|
error_context_stack = &errcallback;
|
||||||
|
|
||||||
|
|
@ -1347,7 +1347,7 @@ stream_stop_cb_wrapper(ReorderBuffer *cache, ReorderBufferTXN *txn,
|
||||||
state.callback_name = "stream_stop";
|
state.callback_name = "stream_stop";
|
||||||
state.report_location = last_lsn;
|
state.report_location = last_lsn;
|
||||||
errcallback.callback = output_plugin_error_callback;
|
errcallback.callback = output_plugin_error_callback;
|
||||||
errcallback.arg = (void *) &state;
|
errcallback.arg = &state;
|
||||||
errcallback.previous = error_context_stack;
|
errcallback.previous = error_context_stack;
|
||||||
error_context_stack = &errcallback;
|
error_context_stack = &errcallback;
|
||||||
|
|
||||||
|
|
@ -1396,7 +1396,7 @@ stream_abort_cb_wrapper(ReorderBuffer *cache, ReorderBufferTXN *txn,
|
||||||
state.callback_name = "stream_abort";
|
state.callback_name = "stream_abort";
|
||||||
state.report_location = abort_lsn;
|
state.report_location = abort_lsn;
|
||||||
errcallback.callback = output_plugin_error_callback;
|
errcallback.callback = output_plugin_error_callback;
|
||||||
errcallback.arg = (void *) &state;
|
errcallback.arg = &state;
|
||||||
errcallback.previous = error_context_stack;
|
errcallback.previous = error_context_stack;
|
||||||
error_context_stack = &errcallback;
|
error_context_stack = &errcallback;
|
||||||
|
|
||||||
|
|
@ -1441,7 +1441,7 @@ stream_prepare_cb_wrapper(ReorderBuffer *cache, ReorderBufferTXN *txn,
|
||||||
state.callback_name = "stream_prepare";
|
state.callback_name = "stream_prepare";
|
||||||
state.report_location = txn->final_lsn;
|
state.report_location = txn->final_lsn;
|
||||||
errcallback.callback = output_plugin_error_callback;
|
errcallback.callback = output_plugin_error_callback;
|
||||||
errcallback.arg = (void *) &state;
|
errcallback.arg = &state;
|
||||||
errcallback.previous = error_context_stack;
|
errcallback.previous = error_context_stack;
|
||||||
error_context_stack = &errcallback;
|
error_context_stack = &errcallback;
|
||||||
|
|
||||||
|
|
@ -1482,7 +1482,7 @@ stream_commit_cb_wrapper(ReorderBuffer *cache, ReorderBufferTXN *txn,
|
||||||
state.callback_name = "stream_commit";
|
state.callback_name = "stream_commit";
|
||||||
state.report_location = txn->final_lsn;
|
state.report_location = txn->final_lsn;
|
||||||
errcallback.callback = output_plugin_error_callback;
|
errcallback.callback = output_plugin_error_callback;
|
||||||
errcallback.arg = (void *) &state;
|
errcallback.arg = &state;
|
||||||
errcallback.previous = error_context_stack;
|
errcallback.previous = error_context_stack;
|
||||||
error_context_stack = &errcallback;
|
error_context_stack = &errcallback;
|
||||||
|
|
||||||
|
|
@ -1523,7 +1523,7 @@ stream_change_cb_wrapper(ReorderBuffer *cache, ReorderBufferTXN *txn,
|
||||||
state.callback_name = "stream_change";
|
state.callback_name = "stream_change";
|
||||||
state.report_location = change->lsn;
|
state.report_location = change->lsn;
|
||||||
errcallback.callback = output_plugin_error_callback;
|
errcallback.callback = output_plugin_error_callback;
|
||||||
errcallback.arg = (void *) &state;
|
errcallback.arg = &state;
|
||||||
errcallback.previous = error_context_stack;
|
errcallback.previous = error_context_stack;
|
||||||
error_context_stack = &errcallback;
|
error_context_stack = &errcallback;
|
||||||
|
|
||||||
|
|
@ -1577,7 +1577,7 @@ stream_message_cb_wrapper(ReorderBuffer *cache, ReorderBufferTXN *txn,
|
||||||
state.callback_name = "stream_message";
|
state.callback_name = "stream_message";
|
||||||
state.report_location = message_lsn;
|
state.report_location = message_lsn;
|
||||||
errcallback.callback = output_plugin_error_callback;
|
errcallback.callback = output_plugin_error_callback;
|
||||||
errcallback.arg = (void *) &state;
|
errcallback.arg = &state;
|
||||||
errcallback.previous = error_context_stack;
|
errcallback.previous = error_context_stack;
|
||||||
error_context_stack = &errcallback;
|
error_context_stack = &errcallback;
|
||||||
|
|
||||||
|
|
@ -1618,7 +1618,7 @@ stream_truncate_cb_wrapper(ReorderBuffer *cache, ReorderBufferTXN *txn,
|
||||||
state.callback_name = "stream_truncate";
|
state.callback_name = "stream_truncate";
|
||||||
state.report_location = change->lsn;
|
state.report_location = change->lsn;
|
||||||
errcallback.callback = output_plugin_error_callback;
|
errcallback.callback = output_plugin_error_callback;
|
||||||
errcallback.arg = (void *) &state;
|
errcallback.arg = &state;
|
||||||
errcallback.previous = error_context_stack;
|
errcallback.previous = error_context_stack;
|
||||||
error_context_stack = &errcallback;
|
error_context_stack = &errcallback;
|
||||||
|
|
||||||
|
|
@ -1657,7 +1657,7 @@ update_progress_txn_cb_wrapper(ReorderBuffer *cache, ReorderBufferTXN *txn,
|
||||||
state.callback_name = "update_progress_txn";
|
state.callback_name = "update_progress_txn";
|
||||||
state.report_location = lsn;
|
state.report_location = lsn;
|
||||||
errcallback.callback = output_plugin_error_callback;
|
errcallback.callback = output_plugin_error_callback;
|
||||||
errcallback.arg = (void *) &state;
|
errcallback.arg = &state;
|
||||||
errcallback.previous = error_context_stack;
|
errcallback.previous = error_context_stack;
|
||||||
error_context_stack = &errcallback;
|
error_context_stack = &errcallback;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -760,7 +760,7 @@ copy_read_data(void *outbuf, int minread, int maxread)
|
||||||
if (avail > maxread)
|
if (avail > maxread)
|
||||||
avail = maxread;
|
avail = maxread;
|
||||||
memcpy(outbuf, ©buf->data[copybuf->cursor], avail);
|
memcpy(outbuf, ©buf->data[copybuf->cursor], avail);
|
||||||
outbuf = (void *) ((char *) outbuf + avail);
|
outbuf = (char *) outbuf + avail;
|
||||||
copybuf->cursor += avail;
|
copybuf->cursor += avail;
|
||||||
maxread -= avail;
|
maxread -= avail;
|
||||||
bytesread += avail;
|
bytesread += avail;
|
||||||
|
|
|
||||||
|
|
@ -2546,7 +2546,7 @@ check_synchronized_standby_slots(char **newval, void **extra, GucSource source)
|
||||||
ptr += strlen(slot_name) + 1;
|
ptr += strlen(slot_name) + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
*extra = (void *) config;
|
*extra = config;
|
||||||
|
|
||||||
pfree(rawname);
|
pfree(rawname);
|
||||||
list_free(elemlist);
|
list_free(elemlist);
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue