int32 res,
cmp;
- cmp = DatumGetInt32(CallerFInfoFunctionCall2(
- data->typecmp,
+ cmp = DatumGetInt32(CallerFInfoFunctionCall2(data->typecmp,
fcinfo->flinfo,
PG_GET_COLLATION(),
(data->strategy == BTLessStrategyNumber ||
}
else
{
- res = DatumGetInt32(CallerFInfoFunctionCall2(
- enum_cmp,
+ res = DatumGetInt32(CallerFInfoFunctionCall2(enum_cmp,
fcinfo->flinfo,
PG_GET_COLLATION(),
ObjectIdGetDatum(a),
key.lower = (GBT_NUMKEY *) &kkk->lower;
key.upper = (GBT_NUMKEY *) &kkk->upper;
- PG_RETURN_BOOL(
- gbt_num_consistent(&key, (void *) &query, &strategy, GIST_LEAF(entry), &tinfo, fcinfo->flinfo)
- );
+ PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query, &strategy,
+ GIST_LEAF(entry), &tinfo,
+ fcinfo->flinfo));
}
key.lower = (GBT_NUMKEY *) &kkk->lower;
key.upper = (GBT_NUMKEY *) &kkk->upper;
- PG_RETURN_FLOAT8(
- gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry), &tinfo, fcinfo->flinfo)
- );
+ PG_RETURN_FLOAT8(gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry),
+ &tinfo, fcinfo->flinfo));
}
Datum
gbt_cash_picksplit(PG_FUNCTION_ARGS)
{
- PG_RETURN_POINTER(gbt_num_picksplit(
- (GistEntryVector *) PG_GETARG_POINTER(0),
+ PG_RETURN_POINTER(gbt_num_picksplit((GistEntryVector *) PG_GETARG_POINTER(0),
(GIST_SPLITVEC *) PG_GETARG_POINTER(1),
- &tinfo, fcinfo->flinfo
- ));
+ &tinfo, fcinfo->flinfo));
}
Datum
static bool
gbt_dategt(const void *a, const void *b, FmgrInfo *flinfo)
{
- return DatumGetBool(
- DirectFunctionCall2(date_gt, DateADTGetDatum(*((const DateADT *) a)), DateADTGetDatum(*((const DateADT *) b)))
- );
+ return DatumGetBool(DirectFunctionCall2(date_gt,
+ DateADTGetDatum(*((const DateADT *) a)),
+ DateADTGetDatum(*((const DateADT *) b))));
}
static bool
gbt_datege(const void *a, const void *b, FmgrInfo *flinfo)
{
- return DatumGetBool(
- DirectFunctionCall2(date_ge, DateADTGetDatum(*((const DateADT *) a)), DateADTGetDatum(*((const DateADT *) b)))
- );
+ return DatumGetBool(DirectFunctionCall2(date_ge,
+ DateADTGetDatum(*((const DateADT *) a)),
+ DateADTGetDatum(*((const DateADT *) b))));
}
static bool
gbt_dateeq(const void *a, const void *b, FmgrInfo *flinfo)
{
- return DatumGetBool(
- DirectFunctionCall2(date_eq, DateADTGetDatum(*((const DateADT *) a)), DateADTGetDatum(*((const DateADT *) b)))
+ return DatumGetBool(DirectFunctionCall2(date_eq,
+ DateADTGetDatum(*((const DateADT *) a)),
+ DateADTGetDatum(*((const DateADT *) b)))
);
}
static bool
gbt_datele(const void *a, const void *b, FmgrInfo *flinfo)
{
- return DatumGetBool(
- DirectFunctionCall2(date_le, DateADTGetDatum(*((const DateADT *) a)), DateADTGetDatum(*((const DateADT *) b)))
- );
+ return DatumGetBool(DirectFunctionCall2(date_le,
+ DateADTGetDatum(*((const DateADT *) a)),
+ DateADTGetDatum(*((const DateADT *) b))));
}
static bool
gbt_datelt(const void *a, const void *b, FmgrInfo *flinfo)
{
- return DatumGetBool(
- DirectFunctionCall2(date_lt, DateADTGetDatum(*((const DateADT *) a)), DateADTGetDatum(*((const DateADT *) b)))
- );
+ return DatumGetBool(DirectFunctionCall2(date_lt,
+ DateADTGetDatum(*((const DateADT *) a)),
+ DateADTGetDatum(*((const DateADT *) b))));
}
dateKEY *ib = (dateKEY *) (((const Nsrt *) b)->t);
int res;
- res = DatumGetInt32(DirectFunctionCall2(date_cmp, DateADTGetDatum(ia->lower), DateADTGetDatum(ib->lower)));
+ res = DatumGetInt32(DirectFunctionCall2(date_cmp,
+ DateADTGetDatum(ia->lower),
+ DateADTGetDatum(ib->lower)));
if (res == 0)
- return DatumGetInt32(DirectFunctionCall2(date_cmp, DateADTGetDatum(ia->upper), DateADTGetDatum(ib->upper)));
+ return DatumGetInt32(DirectFunctionCall2(date_cmp,
+ DateADTGetDatum(ia->upper),
+ DateADTGetDatum(ib->upper)));
return res;
}
key.lower = (GBT_NUMKEY *) &kkk->lower;
key.upper = (GBT_NUMKEY *) &kkk->upper;
- PG_RETURN_BOOL(
- gbt_num_consistent(&key, (void *) &query, &strategy, GIST_LEAF(entry), &tinfo, fcinfo->flinfo)
- );
+ PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query, &strategy,
+ GIST_LEAF(entry), &tinfo,
+ fcinfo->flinfo));
}
key.lower = (GBT_NUMKEY *) &kkk->lower;
key.upper = (GBT_NUMKEY *) &kkk->upper;
- PG_RETURN_FLOAT8(
- gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry), &tinfo, fcinfo->flinfo)
- );
+ PG_RETURN_FLOAT8(gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry),
+ &tinfo, fcinfo->flinfo));
}
int32 diff,
res;
- diff = DatumGetInt32(DirectFunctionCall2(
- date_mi,
+ diff = DatumGetInt32(DirectFunctionCall2(date_mi,
DateADTGetDatum(newentry->upper),
DateADTGetDatum(origentry->upper)));
res = Max(diff, 0);
- diff = DatumGetInt32(DirectFunctionCall2(
- date_mi,
+ diff = DatumGetInt32(DirectFunctionCall2(date_mi,
DateADTGetDatum(origentry->lower),
DateADTGetDatum(newentry->lower)));
if (res > 0)
{
- diff = DatumGetInt32(DirectFunctionCall2(
- date_mi,
+ diff = DatumGetInt32(DirectFunctionCall2(date_mi,
DateADTGetDatum(origentry->upper),
DateADTGetDatum(origentry->lower)));
*result += FLT_MIN;
Datum
gbt_date_picksplit(PG_FUNCTION_ARGS)
{
- PG_RETURN_POINTER(gbt_num_picksplit(
- (GistEntryVector *) PG_GETARG_POINTER(0),
+ PG_RETURN_POINTER(gbt_num_picksplit((GistEntryVector *) PG_GETARG_POINTER(0),
(GIST_SPLITVEC *) PG_GETARG_POINTER(1),
- &tinfo, fcinfo->flinfo
- ));
+ &tinfo, fcinfo->flinfo));
}
Datum
static bool
gbt_enumgt(const void *a, const void *b, FmgrInfo *flinfo)
{
- return DatumGetBool(
- CallerFInfoFunctionCall2(enum_gt, flinfo, InvalidOid, ObjectIdGetDatum(*((const Oid *) a)), ObjectIdGetDatum(*((const Oid *) b)))
- );
+ return DatumGetBool(CallerFInfoFunctionCall2(enum_gt, flinfo, InvalidOid,
+ ObjectIdGetDatum(*((const Oid *) a)),
+ ObjectIdGetDatum(*((const Oid *) b))));
}
static bool
gbt_enumge(const void *a, const void *b, FmgrInfo *flinfo)
{
- return DatumGetBool(
- CallerFInfoFunctionCall2(enum_ge, flinfo, InvalidOid, ObjectIdGetDatum(*((const Oid *) a)), ObjectIdGetDatum(*((const Oid *) b)))
- );
+ return DatumGetBool(CallerFInfoFunctionCall2(enum_ge, flinfo, InvalidOid,
+ ObjectIdGetDatum(*((const Oid *) a)),
+ ObjectIdGetDatum(*((const Oid *) b))));
}
static bool
gbt_enumeq(const void *a, const void *b, FmgrInfo *flinfo)
static bool
gbt_enumle(const void *a, const void *b, FmgrInfo *flinfo)
{
- return DatumGetBool(
- CallerFInfoFunctionCall2(enum_le, flinfo, InvalidOid, ObjectIdGetDatum(*((const Oid *) a)), ObjectIdGetDatum(*((const Oid *) b)))
- );
+ return DatumGetBool(CallerFInfoFunctionCall2(enum_le, flinfo, InvalidOid,
+ ObjectIdGetDatum(*((const Oid *) a)),
+ ObjectIdGetDatum(*((const Oid *) b))));
}
static bool
gbt_enumlt(const void *a, const void *b, FmgrInfo *flinfo)
{
- return DatumGetBool(
- CallerFInfoFunctionCall2(enum_lt, flinfo, InvalidOid, ObjectIdGetDatum(*((const Oid *) a)), ObjectIdGetDatum(*((const Oid *) b)))
- );
+ return DatumGetBool(CallerFInfoFunctionCall2(enum_lt, flinfo, InvalidOid,
+ ObjectIdGetDatum(*((const Oid *) a)),
+ ObjectIdGetDatum(*((const Oid *) b))));
}
static int
if (ia->upper == ib->upper)
return 0;
- return DatumGetInt32(
- CallerFInfoFunctionCall2(enum_cmp, flinfo, InvalidOid, ObjectIdGetDatum(ia->upper), ObjectIdGetDatum(ib->upper))
- );
+ return DatumGetInt32(CallerFInfoFunctionCall2(enum_cmp, flinfo, InvalidOid,
+ ObjectIdGetDatum(ia->upper),
+ ObjectIdGetDatum(ib->upper)));
}
- return DatumGetInt32(
- CallerFInfoFunctionCall2(enum_cmp, flinfo, InvalidOid, ObjectIdGetDatum(ia->lower), ObjectIdGetDatum(ib->lower))
- );
+ return DatumGetInt32(CallerFInfoFunctionCall2(enum_cmp, flinfo, InvalidOid,
+ ObjectIdGetDatum(ia->lower),
+ ObjectIdGetDatum(ib->lower)));
}
static const gbtree_ninfo tinfo =
key.lower = (GBT_NUMKEY *) &kkk->lower;
key.upper = (GBT_NUMKEY *) &kkk->upper;
- PG_RETURN_BOOL(
- gbt_num_consistent(&key, (void *) &query, &strategy, GIST_LEAF(entry), &tinfo, fcinfo->flinfo)
- );
+ PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query, &strategy,
+ GIST_LEAF(entry), &tinfo,
+ fcinfo->flinfo));
}
Datum
Datum
gbt_enum_picksplit(PG_FUNCTION_ARGS)
{
- PG_RETURN_POINTER(gbt_num_picksplit(
- (GistEntryVector *) PG_GETARG_POINTER(0),
+ PG_RETURN_POINTER(gbt_num_picksplit((GistEntryVector *) PG_GETARG_POINTER(0),
(GIST_SPLITVEC *) PG_GETARG_POINTER(1),
- &tinfo, fcinfo->flinfo
- ));
+ &tinfo, fcinfo->flinfo));
}
Datum
key.lower = (GBT_NUMKEY *) &kkk->lower;
key.upper = (GBT_NUMKEY *) &kkk->upper;
- PG_RETURN_BOOL(
- gbt_num_consistent(&key, (void *) &query, &strategy, GIST_LEAF(entry), &tinfo, fcinfo->flinfo)
- );
+ PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query, &strategy,
+ GIST_LEAF(entry), &tinfo,
+ fcinfo->flinfo));
}
key.lower = (GBT_NUMKEY *) &kkk->lower;
key.upper = (GBT_NUMKEY *) &kkk->upper;
- PG_RETURN_FLOAT8(
- gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry), &tinfo, fcinfo->flinfo)
- );
+ PG_RETURN_FLOAT8(gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry),
+ &tinfo, fcinfo->flinfo));
}
Datum
gbt_float4_picksplit(PG_FUNCTION_ARGS)
{
- PG_RETURN_POINTER(gbt_num_picksplit(
- (GistEntryVector *) PG_GETARG_POINTER(0),
+ PG_RETURN_POINTER(gbt_num_picksplit((GistEntryVector *) PG_GETARG_POINTER(0),
(GIST_SPLITVEC *) PG_GETARG_POINTER(1),
- &tinfo, fcinfo->flinfo
- ));
+ &tinfo, fcinfo->flinfo));
}
Datum
key.lower = (GBT_NUMKEY *) &kkk->lower;
key.upper = (GBT_NUMKEY *) &kkk->upper;
- PG_RETURN_BOOL(
- gbt_num_consistent(&key, (void *) &query, &strategy, GIST_LEAF(entry), &tinfo, fcinfo->flinfo)
- );
+ PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query, &strategy,
+ GIST_LEAF(entry), &tinfo,
+ fcinfo->flinfo));
}
key.lower = (GBT_NUMKEY *) &kkk->lower;
key.upper = (GBT_NUMKEY *) &kkk->upper;
- PG_RETURN_FLOAT8(
- gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry), &tinfo, fcinfo->flinfo)
- );
+ PG_RETURN_FLOAT8(gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry),
+ &tinfo, fcinfo->flinfo));
}
Datum
gbt_float8_picksplit(PG_FUNCTION_ARGS)
{
- PG_RETURN_POINTER(gbt_num_picksplit(
- (GistEntryVector *) PG_GETARG_POINTER(0),
+ PG_RETURN_POINTER(gbt_num_picksplit((GistEntryVector *) PG_GETARG_POINTER(0),
(GIST_SPLITVEC *) PG_GETARG_POINTER(1),
- &tinfo, fcinfo->flinfo
- ));
+ &tinfo, fcinfo->flinfo));
}
Datum
Datum
gbt_inet_picksplit(PG_FUNCTION_ARGS)
{
- PG_RETURN_POINTER(gbt_num_picksplit(
- (GistEntryVector *) PG_GETARG_POINTER(0),
+ PG_RETURN_POINTER(gbt_num_picksplit((GistEntryVector *) PG_GETARG_POINTER(0),
(GIST_SPLITVEC *) PG_GETARG_POINTER(1),
- &tinfo, fcinfo->flinfo
- ));
+ &tinfo, fcinfo->flinfo));
}
Datum
key.lower = (GBT_NUMKEY *) &kkk->lower;
key.upper = (GBT_NUMKEY *) &kkk->upper;
- PG_RETURN_BOOL(
- gbt_num_consistent(&key, (void *) &query, &strategy, GIST_LEAF(entry), &tinfo, fcinfo->flinfo)
- );
+ PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query, &strategy,
+ GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
}
key.lower = (GBT_NUMKEY *) &kkk->lower;
key.upper = (GBT_NUMKEY *) &kkk->upper;
- PG_RETURN_FLOAT8(
- gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry), &tinfo, fcinfo->flinfo)
- );
+ PG_RETURN_FLOAT8(gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry),
+ &tinfo, fcinfo->flinfo));
}
Datum
gbt_int2_picksplit(PG_FUNCTION_ARGS)
{
- PG_RETURN_POINTER(gbt_num_picksplit(
- (GistEntryVector *) PG_GETARG_POINTER(0),
+ PG_RETURN_POINTER(gbt_num_picksplit((GistEntryVector *) PG_GETARG_POINTER(0),
(GIST_SPLITVEC *) PG_GETARG_POINTER(1),
- &tinfo, fcinfo->flinfo
- ));
+ &tinfo, fcinfo->flinfo));
}
Datum
key.lower = (GBT_NUMKEY *) &kkk->lower;
key.upper = (GBT_NUMKEY *) &kkk->upper;
- PG_RETURN_BOOL(
- gbt_num_consistent(&key, (void *) &query, &strategy, GIST_LEAF(entry), &tinfo, fcinfo->flinfo)
- );
+ PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query, &strategy,
+ GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
}
key.lower = (GBT_NUMKEY *) &kkk->lower;
key.upper = (GBT_NUMKEY *) &kkk->upper;
- PG_RETURN_FLOAT8(
- gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry), &tinfo, fcinfo->flinfo)
- );
+ PG_RETURN_FLOAT8(gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry),
+ &tinfo, fcinfo->flinfo));
}
Datum
gbt_int4_picksplit(PG_FUNCTION_ARGS)
{
- PG_RETURN_POINTER(gbt_num_picksplit(
- (GistEntryVector *) PG_GETARG_POINTER(0),
+ PG_RETURN_POINTER(gbt_num_picksplit((GistEntryVector *) PG_GETARG_POINTER(0),
(GIST_SPLITVEC *) PG_GETARG_POINTER(1),
- &tinfo, fcinfo->flinfo
- ));
+ &tinfo, fcinfo->flinfo));
}
Datum
key.lower = (GBT_NUMKEY *) &kkk->lower;
key.upper = (GBT_NUMKEY *) &kkk->upper;
- PG_RETURN_BOOL(
- gbt_num_consistent(&key, (void *) &query, &strategy, GIST_LEAF(entry), &tinfo, fcinfo->flinfo)
- );
+ PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query, &strategy,
+ GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
}
key.lower = (GBT_NUMKEY *) &kkk->lower;
key.upper = (GBT_NUMKEY *) &kkk->upper;
- PG_RETURN_FLOAT8(
- gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry), &tinfo, fcinfo->flinfo)
- );
+ PG_RETURN_FLOAT8(gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry),
+ &tinfo, fcinfo->flinfo));
}
Datum
gbt_int8_picksplit(PG_FUNCTION_ARGS)
{
- PG_RETURN_POINTER(gbt_num_picksplit(
- (GistEntryVector *) PG_GETARG_POINTER(0),
+ PG_RETURN_POINTER(gbt_num_picksplit((GistEntryVector *) PG_GETARG_POINTER(0),
(GIST_SPLITVEC *) PG_GETARG_POINTER(1),
- &tinfo, fcinfo->flinfo
- ));
+ &tinfo, fcinfo->flinfo));
}
Datum
key.lower = (GBT_NUMKEY *) &kkk->lower;
key.upper = (GBT_NUMKEY *) &kkk->upper;
- PG_RETURN_BOOL(
- gbt_num_consistent(&key, (void *) query, &strategy, GIST_LEAF(entry), &tinfo, fcinfo->flinfo)
- );
+ PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) query, &strategy,
+ GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
}
key.lower = (GBT_NUMKEY *) &kkk->lower;
key.upper = (GBT_NUMKEY *) &kkk->upper;
- PG_RETURN_FLOAT8(
- gbt_num_distance(&key, (void *) query, GIST_LEAF(entry), &tinfo, fcinfo->flinfo)
- );
+ PG_RETURN_FLOAT8(gbt_num_distance(&key, (void *) query, GIST_LEAF(entry),
+ &tinfo, fcinfo->flinfo));
}
Datum
gbt_intv_picksplit(PG_FUNCTION_ARGS)
{
- PG_RETURN_POINTER(gbt_num_picksplit(
- (GistEntryVector *) PG_GETARG_POINTER(0),
+ PG_RETURN_POINTER(gbt_num_picksplit((GistEntryVector *) PG_GETARG_POINTER(0),
(GIST_SPLITVEC *) PG_GETARG_POINTER(1),
- &tinfo, fcinfo->flinfo
- ));
+ &tinfo, fcinfo->flinfo));
}
Datum
key.lower = (GBT_NUMKEY *) &kkk->lower;
key.upper = (GBT_NUMKEY *) &kkk->upper;
- PG_RETURN_BOOL(
- gbt_num_consistent(&key, (void *) query, &strategy, GIST_LEAF(entry), &tinfo, fcinfo->flinfo)
- );
+ PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) query, &strategy,
+ GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
}
Datum
gbt_macad_picksplit(PG_FUNCTION_ARGS)
{
- PG_RETURN_POINTER(gbt_num_picksplit(
- (GistEntryVector *) PG_GETARG_POINTER(0),
+ PG_RETURN_POINTER(gbt_num_picksplit((GistEntryVector *) PG_GETARG_POINTER(0),
(GIST_SPLITVEC *) PG_GETARG_POINTER(1),
- &tinfo, fcinfo->flinfo
- ));
+ &tinfo, fcinfo->flinfo));
}
Datum
key.lower = (GBT_NUMKEY *) &kkk->lower;
key.upper = (GBT_NUMKEY *) &kkk->upper;
- PG_RETURN_BOOL(
- gbt_num_consistent(&key, (void *) query, &strategy, GIST_LEAF(entry), &tinfo, fcinfo->flinfo)
- );
+ PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) query, &strategy,
+ GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
}
Datum
gbt_macad8_picksplit(PG_FUNCTION_ARGS)
{
- PG_RETURN_POINTER(gbt_num_picksplit(
- (GistEntryVector *) PG_GETARG_POINTER(0),
+ PG_RETURN_POINTER(gbt_num_picksplit((GistEntryVector *) PG_GETARG_POINTER(0),
(GIST_SPLITVEC *) PG_GETARG_POINTER(1),
- &tinfo, fcinfo->flinfo
- ));
+ &tinfo, fcinfo->flinfo));
}
Datum
ok = gbt_var_key_readable(org);
uk = gbt_var_key_readable((GBT_VARKEY *) DatumGetPointer(uni));
- us = DatumGetNumeric(DirectFunctionCall2(
- numeric_sub,
+ us = DatumGetNumeric(DirectFunctionCall2(numeric_sub,
PointerGetDatum(uk.upper),
- PointerGetDatum(uk.lower)
- ));
+ PointerGetDatum(uk.lower)));
- os = DatumGetNumeric(DirectFunctionCall2(
- numeric_sub,
+ os = DatumGetNumeric(DirectFunctionCall2(numeric_sub,
PointerGetDatum(ok.upper),
- PointerGetDatum(ok.lower)
- ));
+ PointerGetDatum(ok.lower)));
- ds = DatumGetNumeric(DirectFunctionCall2(
- numeric_sub,
+ ds = DatumGetNumeric(DirectFunctionCall2(numeric_sub,
NumericGetDatum(us),
- NumericGetDatum(os)
- ));
+ NumericGetDatum(os)));
if (numeric_is_nan(us))
{
if (DirectFunctionCall2(numeric_gt, NumericGetDatum(ds), NumericGetDatum(nul)))
{
*result += FLT_MIN;
- os = DatumGetNumeric(DirectFunctionCall2(
- numeric_div,
+ os = DatumGetNumeric(DirectFunctionCall2(numeric_div,
NumericGetDatum(ds),
- NumericGetDatum(us)
- ));
+ NumericGetDatum(us)));
*result += (float4) DatumGetFloat8(DirectFunctionCall1(numeric_float8_no_overflow, NumericGetDatum(os)));
}
}
key.lower = (GBT_NUMKEY *) &kkk->lower;
key.upper = (GBT_NUMKEY *) &kkk->upper;
- PG_RETURN_BOOL(
- gbt_num_consistent(&key, (void *) &query, &strategy, GIST_LEAF(entry), &tinfo, fcinfo->flinfo)
- );
+ PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query, &strategy,
+ GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
}
key.lower = (GBT_NUMKEY *) &kkk->lower;
key.upper = (GBT_NUMKEY *) &kkk->upper;
- PG_RETURN_FLOAT8(
- gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry), &tinfo, fcinfo->flinfo)
- );
+ PG_RETURN_FLOAT8(gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry),
+ &tinfo, fcinfo->flinfo));
}
Datum
gbt_oid_picksplit(PG_FUNCTION_ARGS)
{
- PG_RETURN_POINTER(gbt_num_picksplit(
- (GistEntryVector *) PG_GETARG_POINTER(0),
+ PG_RETURN_POINTER(gbt_num_picksplit((GistEntryVector *) PG_GETARG_POINTER(0),
(GIST_SPLITVEC *) PG_GETARG_POINTER(1),
- &tinfo, fcinfo->flinfo
- ));
+ &tinfo, fcinfo->flinfo));
}
Datum
key.lower = (GBT_NUMKEY *) &kkk->lower;
key.upper = (GBT_NUMKEY *) &kkk->upper;
- PG_RETURN_BOOL(
- gbt_num_consistent(&key, (void *) &query, &strategy, GIST_LEAF(entry), &tinfo, fcinfo->flinfo)
- );
+ PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query, &strategy,
+ GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
}
Datum
key.lower = (GBT_NUMKEY *) &kkk->lower;
key.upper = (GBT_NUMKEY *) &kkk->upper;
- PG_RETURN_FLOAT8(
- gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry), &tinfo, fcinfo->flinfo)
- );
+ PG_RETURN_FLOAT8(gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry),
+ &tinfo, fcinfo->flinfo));
}
Datum
key.lower = (GBT_NUMKEY *) &kkk->lower;
key.upper = (GBT_NUMKEY *) &kkk->upper;
- PG_RETURN_BOOL(
- gbt_num_consistent(&key, (void *) &qqq, &strategy, GIST_LEAF(entry), &tinfo, fcinfo->flinfo)
- );
+ PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &qqq, &strategy,
+ GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
}
double res;
double res2;
- intr = DatumGetIntervalP(DirectFunctionCall2(
- time_mi_time,
+ intr = DatumGetIntervalP(DirectFunctionCall2(time_mi_time,
TimeADTGetDatumFast(newentry->upper),
TimeADTGetDatumFast(origentry->upper)));
res = INTERVAL_TO_SEC(intr);
res = Max(res, 0);
- intr = DatumGetIntervalP(DirectFunctionCall2(
- time_mi_time,
+ intr = DatumGetIntervalP(DirectFunctionCall2(time_mi_time,
TimeADTGetDatumFast(origentry->lower),
TimeADTGetDatumFast(newentry->lower)));
res2 = INTERVAL_TO_SEC(intr);
if (res > 0)
{
- intr = DatumGetIntervalP(DirectFunctionCall2(
- time_mi_time,
+ intr = DatumGetIntervalP(DirectFunctionCall2(time_mi_time,
TimeADTGetDatumFast(origentry->upper),
TimeADTGetDatumFast(origentry->lower)));
*result += FLT_MIN;
Datum
gbt_time_picksplit(PG_FUNCTION_ARGS)
{
- PG_RETURN_POINTER(gbt_num_picksplit(
- (GistEntryVector *) PG_GETARG_POINTER(0),
+ PG_RETURN_POINTER(gbt_num_picksplit((GistEntryVector *) PG_GETARG_POINTER(0),
(GIST_SPLITVEC *) PG_GETARG_POINTER(1),
- &tinfo, fcinfo->flinfo
- ));
+ &tinfo, fcinfo->flinfo));
}
Datum
key.lower = (GBT_NUMKEY *) &kkk->lower;
key.upper = (GBT_NUMKEY *) &kkk->upper;
- PG_RETURN_BOOL(
- gbt_num_consistent(&key, (void *) &query, &strategy, GIST_LEAF(entry), &tinfo, fcinfo->flinfo)
- );
+ PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query, &strategy,
+ GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
}
Datum
key.lower = (GBT_NUMKEY *) &kkk->lower;
key.upper = (GBT_NUMKEY *) &kkk->upper;
- PG_RETURN_FLOAT8(
- gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry), &tinfo, fcinfo->flinfo)
- );
+ PG_RETURN_FLOAT8(gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry),
+ &tinfo, fcinfo->flinfo));
}
Datum
key.upper = (GBT_NUMKEY *) &kkk[MAXALIGN(tinfo.size)];
qqq = tstz_to_ts_gmt(query);
- PG_RETURN_BOOL(
- gbt_num_consistent(&key, (void *) &qqq, &strategy, GIST_LEAF(entry), &tinfo, fcinfo->flinfo)
- );
+ PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &qqq, &strategy,
+ GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
}
Datum
key.upper = (GBT_NUMKEY *) &kkk[MAXALIGN(tinfo.size)];
qqq = tstz_to_ts_gmt(query);
- PG_RETURN_FLOAT8(
- gbt_num_distance(&key, (void *) &qqq, GIST_LEAF(entry), &tinfo, fcinfo->flinfo)
- );
+ PG_RETURN_FLOAT8(gbt_num_distance(&key, (void *) &qqq, GIST_LEAF(entry),
+ &tinfo, fcinfo->flinfo));
}
Datum
gbt_ts_picksplit(PG_FUNCTION_ARGS)
{
- PG_RETURN_POINTER(gbt_num_picksplit(
- (GistEntryVector *) PG_GETARG_POINTER(0),
+ PG_RETURN_POINTER(gbt_num_picksplit((GistEntryVector *) PG_GETARG_POINTER(0),
(GIST_SPLITVEC *) PG_GETARG_POINTER(1),
- &tinfo, fcinfo->flinfo
- ));
+ &tinfo, fcinfo->flinfo));
}
Datum
static bool
gbt_var_node_pf_match(const GBT_VARKEY_R *node, const bytea *query, const gbtree_vinfo *tinfo)
{
- return (tinfo->trnc && (
- gbt_bytea_pf_match(node->lower, query, tinfo) ||
- gbt_bytea_pf_match(node->upper, query, tinfo)
- ));
+ return (tinfo->trnc &&
+ (gbt_bytea_pf_match(node->lower, query, tinfo) ||
+ gbt_bytea_pf_match(node->upper, query, tinfo)));
}
key.lower = (GBT_NUMKEY *) &kkk->lower;
key.upper = (GBT_NUMKEY *) &kkk->upper;
- PG_RETURN_BOOL(
- gbt_num_consistent(&key, (void *) query, &strategy,
- GIST_LEAF(entry), &tinfo, fcinfo->flinfo)
- );
+ PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) query, &strategy,
+ GIST_LEAF(entry), &tinfo,
+ fcinfo->flinfo));
}
Datum
Datum
gbt_uuid_picksplit(PG_FUNCTION_ARGS)
{
- PG_RETURN_POINTER(gbt_num_picksplit(
- (GistEntryVector *) PG_GETARG_POINTER(0),
+ PG_RETURN_POINTER(gbt_num_picksplit((GistEntryVector *) PG_GETARG_POINTER(0),
(GIST_SPLITVEC *) PG_GETARG_POINTER(1),
- &tinfo, fcinfo->flinfo
- ));
+ &tinfo, fcinfo->flinfo));
}
Datum
/* First compute the union of the dimensions present in both args */
for (i = 0; i < DIM(b); i++)
{
- result->x[i] = Min(
- Min(LL_COORD(a, i), UR_COORD(a, i)),
- Min(LL_COORD(b, i), UR_COORD(b, i))
- );
- result->x[i + DIM(a)] = Max(
- Max(LL_COORD(a, i), UR_COORD(a, i)),
- Max(LL_COORD(b, i), UR_COORD(b, i))
- );
+ result->x[i] = Min(Min(LL_COORD(a, i), UR_COORD(a, i)),
+ Min(LL_COORD(b, i), UR_COORD(b, i)));
+ result->x[i + DIM(a)] = Max(Max(LL_COORD(a, i), UR_COORD(a, i)),
+ Max(LL_COORD(b, i), UR_COORD(b, i)));
}
/* continue on the higher dimensions only present in 'a' */
for (; i < DIM(a); i++)
/* First compute intersection of the dimensions present in both args */
for (i = 0; i < DIM(b); i++)
{
- result->x[i] = Max(
- Min(LL_COORD(a, i), UR_COORD(a, i)),
- Min(LL_COORD(b, i), UR_COORD(b, i))
- );
- result->x[i + DIM(a)] = Min(
- Max(LL_COORD(a, i), UR_COORD(a, i)),
- Max(LL_COORD(b, i), UR_COORD(b, i))
- );
+ result->x[i] = Max(Min(LL_COORD(a, i), UR_COORD(a, i)),
+ Min(LL_COORD(b, i), UR_COORD(b, i)));
+ result->x[i + DIM(a)] = Min(Max(LL_COORD(a, i), UR_COORD(a, i)),
+ Max(LL_COORD(b, i), UR_COORD(b, i)));
}
/* continue on the higher dimensions only present in 'a' */
for (; i < DIM(a); i++)
if (!is_sql_cmd)
nestlevel = applyRemoteGucs(conn);
- oldcontext = MemoryContextSwitchTo(
- rsinfo->econtext->ecxt_per_query_memory);
+ oldcontext = MemoryContextSwitchTo(rsinfo->econtext->ecxt_per_query_memory);
tupstore = tuplestore_begin_heap(true, false, work_mem);
rsinfo->setResult = tupstore;
rsinfo->setDesc = tupdesc;
TEXTOID, -1, 0);
attinmeta = TupleDescGetAttInMetadata(tupdesc);
- oldcontext = MemoryContextSwitchTo(
- rsinfo->econtext->ecxt_per_query_memory);
+ oldcontext = MemoryContextSwitchTo(rsinfo->econtext->ecxt_per_query_memory);
tupstore = tuplestore_begin_heap(true, false, work_mem);
rsinfo->setResult = tupstore;
rsinfo->setDesc = tupdesc;
}
/* germanic, greek, or otherwise 'ch' for 'kh' sound */
- if (
- (StringAt(original, 0, 4, "VAN ", "VON ", "")
+ if ((StringAt(original, 0, 4, "VAN ", "VON ", "")
|| StringAt(original, 0, 3, "SCH", ""))
/* 'architect but not 'arch', 'orchestra', 'orchid' */
|| StringAt(original, (current - 2), 6, "ORCHES",
&& !StringAt(original, (current + 2), 2, "HU", ""))
{
/* 'accident', 'accede' 'succeed' */
- if (
- ((current == 1)
+ if (((current == 1)
&& (GetAt(original, current - 1) == 'A'))
|| StringAt(original, (current - 1), 5, "UCCEE",
"UCCES", ""))
* Parker's rule (with some further refinements) - e.g.,
* 'hugh'
*/
- if (
- ((current > 1)
+ if (((current > 1)
&& StringAt(original, (current - 2), 1,
"B", "H", "D", ""))
/* e.g., 'bough' */
}
/* -ger-, -gy- */
- if (
- (StringAt(original, (current + 1), 2, "ER", "")
+ if ((StringAt(original, (current + 1), 2, "ER", "")
|| (GetAt(original, current + 1) == 'Y'))
&& !StringAt(original, 0, 6,
"DANGER", "RANGER", "MANGER", "")
&& !StringAt(original, (current - 1), 1, "E", "I", "")
- && !StringAt(original, (current - 1), 3, "RGY", "OGY",
- ""))
+ && !StringAt(original, (current - 1), 3, "RGY", "OGY", ""))
{
MetaphAdd(primary, "K");
MetaphAdd(secondary, "J");
"AGGI", "OGGI", ""))
{
/* obvious germanic */
- if (
- (StringAt(original, 0, 4, "VAN ", "VON ", "")
+ if ((StringAt(original, 0, 4, "VAN ", "VON ", "")
|| StringAt(original, 0, 3, "SCH", ""))
|| StringAt(original, (current + 1), 2, "ET", ""))
{
}
else
{
- out_datums[i] = PointerGetDatum(
- cstring_to_text_with_len(HSTORE_VAL(entries, ptr, idx),
- HSTORE_VALLEN(entries, idx)));
+ out_datums[i] =
+ PointerGetDatum(cstring_to_text_with_len(HSTORE_VAL(entries, ptr, idx),
+ HSTORE_VALLEN(entries, idx)));
out_nulls[i] = false;
}
}
Datum
_int_different(PG_FUNCTION_ARGS)
{
- PG_RETURN_BOOL(!DatumGetBool(
- DirectFunctionCall2(
- _int_same,
+ PG_RETURN_BOOL(!DatumGetBool(DirectFunctionCall2(_int_same,
PointerGetDatum(PG_GETARG_POINTER(0)),
- PointerGetDatum(PG_GETARG_POINTER(1))
- )
- ));
+ PointerGetDatum(PG_GETARG_POINTER(1)))));
}
Datum
if (LTG_ISALLTRUE(key))
return true;
- return ltree_execute(
- GETQUERY(query),
+ return ltree_execute(GETQUERY(query),
(void *) LTG_SIGN(key), false,
- checkcondition_bit
- );
+ checkcondition_bit);
}
static bool
isok = false;
while ((tn = getlexeme(tn, endt, &lent)) != NULL)
{
- if (
- (
- lent == lenq ||
- (lent > lenq && anyend)
- ) &&
+ if ((lent == lenq || (lent > lenq && anyend)) &&
(*cmpptr) (qn, tn, lenq) == 0)
{
if (compare_subnode(curt, curvar->name, curvar->len, cmpptr, (curvar->flag & LVAR_ANYEND)))
return true;
}
- else if (
- (
- curvar->len == curt->len ||
- (curt->len > curvar->len && (curvar->flag & LVAR_ANYEND))
- ) &&
+ else if ((curvar->len == curt->len ||
+ (curt->len > curvar->len && (curvar->flag & LVAR_ANYEND))) &&
(*cmpptr) (curvar->name, curt->name, curvar->len) == 0)
{
static int
treekey_cmp(const void *a, const void *b)
{
- return ltree_compare(
- ((const RIX *) a)->r,
- ((const RIX *) b)->r
- );
+ return ltree_compare(((const RIX *) a)->r,
+ ((const RIX *) b)->r);
}
if (LTG_ISALLTRUE(key))
return true;
- return ltree_execute(
- GETQUERY(query),
+ return ltree_execute(GETQUERY(query),
(void *) LTG_SIGN(key), false,
- checkcondition_bit
- );
+ checkcondition_bit);
}
static bool
if (GIST_LEAF(entry))
res = (ltree_compare((ltree *) query, LTG_NODE(key)) == 0);
else
- res = (
- ltree_compare((ltree *) query, LTG_GETLNODE(key)) >= 0
+ res = (ltree_compare((ltree *) query, LTG_GETLNODE(key)) >= 0
&&
- ltree_compare((ltree *) query, LTG_GETRNODE(key)) <= 0
- );
+ ltree_compare((ltree *) query, LTG_GETRNODE(key)) <= 0);
break;
case BTGreaterEqualStrategyNumber:
query = PG_GETARG_LTREE_P(1);
if (compare_subnode(level, op, val->length, cmpptr, (val->flag & LVAR_ANYEND)))
return true;
}
- else if (
- (
- val->length == level->len ||
- (level->len > val->length && (val->flag & LVAR_ANYEND))
- ) &&
+ else if ((val->length == level->len ||
+ (level->len > val->length && (val->flag & LVAR_ANYEND))) &&
(*cmpptr) (op, level->name, val->length) == 0)
return true;
chkval.node = val;
chkval.operand = GETOPERAND(query);
- result = ltree_execute(
- GETQUERY(query),
+ result = ltree_execute(GETQUERY(query),
&chkval,
true,
- checkcondition_str
- );
+ checkcondition_str);
PG_FREE_IF_COPY(val, 0);
PG_FREE_IF_COPY(query, 1);
free(comma_filenodes);
/* now build the query */
- todo = psprintf(
- "SELECT pg_catalog.pg_relation_filenode(c.oid) as \"Filenode\", relname as \"Table Name\" %s\n"
+ todo = psprintf("SELECT pg_catalog.pg_relation_filenode(c.oid) as \"Filenode\", relname as \"Table Name\" %s\n"
"FROM pg_catalog.pg_class c\n"
" LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace\n"
" LEFT JOIN pg_catalog.pg_database d ON d.datname = pg_catalog.current_database(),\n"
bits_len =
BITMAPLEN(HeapTupleHeaderGetNatts(tuphdr)) * BITS_PER_BYTE;
- values[11] = CStringGetTextDatum(
- bits_to_text(tuphdr->t_bits, bits_len));
+ values[11] = CStringGetTextDatum(bits_to_text(tuphdr->t_bits, bits_len));
}
else
nulls[11] = true;
if (ISALLTRUE(datum_l) && cache[j].allistrue)
size_alpha = 0;
else
- size_alpha = SIGLENBIT - sizebitvec(
- (cache[j].allistrue) ? GETSIGN(datum_l) : GETSIGN(cache[j].sign)
- );
+ size_alpha = SIGLENBIT -
+ sizebitvec((cache[j].allistrue) ? GETSIGN(datum_l) :
+ GETSIGN(cache[j].sign));
}
else
size_alpha = hemdistsign(cache[j].sign, GETSIGN(datum_l));
if (ISALLTRUE(datum_r) && cache[j].allistrue)
size_beta = 0;
else
- size_beta = SIGLENBIT - sizebitvec(
- (cache[j].allistrue) ? GETSIGN(datum_r) : GETSIGN(cache[j].sign)
- );
+ size_beta = SIGLENBIT -
+ sizebitvec((cache[j].allistrue) ? GETSIGN(datum_r) :
+ GETSIGN(cache[j].sign));
}
else
size_beta = hemdistsign(cache[j].sign, GETSIGN(datum_r));
d[i] = PointerGetDatum(item);
}
- a = construct_array(
- d,
+ a = construct_array(d,
ARRNELEM(trg),
TEXTOID,
-1,
false,
- 'i'
- );
+ 'i');
for (i = 0; i < ARRNELEM(trg); i++)
pfree(DatumGetPointer(d[i]));
Datum
seg_same(PG_FUNCTION_ARGS)
{
- int cmp = DatumGetInt32(
- DirectFunctionCall2(seg_cmp, PG_GETARG_DATUM(0), PG_GETARG_DATUM(1)));
+ int cmp = DatumGetInt32(DirectFunctionCall2(seg_cmp,
+ PG_GETARG_DATUM(0),
+ PG_GETARG_DATUM(1)));
PG_RETURN_BOOL(cmp == 0);
}
Datum
seg_lt(PG_FUNCTION_ARGS)
{
- int cmp = DatumGetInt32(
- DirectFunctionCall2(seg_cmp, PG_GETARG_DATUM(0), PG_GETARG_DATUM(1)));
+ int cmp = DatumGetInt32(DirectFunctionCall2(seg_cmp,
+ PG_GETARG_DATUM(0),
+ PG_GETARG_DATUM(1)));
PG_RETURN_BOOL(cmp < 0);
}
Datum
seg_le(PG_FUNCTION_ARGS)
{
- int cmp = DatumGetInt32(
- DirectFunctionCall2(seg_cmp, PG_GETARG_DATUM(0), PG_GETARG_DATUM(1)));
+ int cmp = DatumGetInt32(DirectFunctionCall2(seg_cmp,
+ PG_GETARG_DATUM(0),
+ PG_GETARG_DATUM(1)));
PG_RETURN_BOOL(cmp <= 0);
}
Datum
seg_gt(PG_FUNCTION_ARGS)
{
- int cmp = DatumGetInt32(
- DirectFunctionCall2(seg_cmp, PG_GETARG_DATUM(0), PG_GETARG_DATUM(1)));
+ int cmp = DatumGetInt32(DirectFunctionCall2(seg_cmp,
+ PG_GETARG_DATUM(0),
+ PG_GETARG_DATUM(1)));
PG_RETURN_BOOL(cmp > 0);
}
Datum
seg_ge(PG_FUNCTION_ARGS)
{
- int cmp = DatumGetInt32(
- DirectFunctionCall2(seg_cmp, PG_GETARG_DATUM(0), PG_GETARG_DATUM(1)));
+ int cmp = DatumGetInt32(DirectFunctionCall2(seg_cmp,
+ PG_GETARG_DATUM(0),
+ PG_GETARG_DATUM(1)));
PG_RETURN_BOOL(cmp >= 0);
}
Datum
seg_different(PG_FUNCTION_ARGS)
{
- int cmp = DatumGetInt32(
- DirectFunctionCall2(seg_cmp, PG_GETARG_DATUM(0), PG_GETARG_DATUM(1)));
+ int cmp = DatumGetInt32(DirectFunctionCall2(seg_cmp,
+ PG_GETARG_DATUM(0),
+ PG_GETARG_DATUM(1)));
PG_RETURN_BOOL(cmp != 0);
}
appendStringInfoString(ctx->out, "table ");
appendStringInfoString(ctx->out,
- quote_qualified_identifier(
- get_namespace_name(
- get_rel_namespace(RelationGetRelid(relation))),
+ quote_qualified_identifier(get_namespace_name(get_rel_namespace(RelationGetRelid(relation))),
class_form->relrewrite ?
get_rel_name(class_form->relrewrite) :
NameStr(class_form->relname)));
static GinTernaryValue
directTriConsistentFn(GinScanKey key)
{
- return DatumGetGinTernaryValue(FunctionCall7Coll(
- key->triConsistentFmgrInfo,
+ return DatumGetGinTernaryValue(FunctionCall7Coll(key->triConsistentFmgrInfo,
key->collation,
PointerGetDatum(key->entryRes),
UInt16GetDatum(key->strategy),
{
GinTernaryValue result;
- result = DatumGetGinTernaryValue(FunctionCall7Coll(
- key->triConsistentFmgrInfo,
+ result = DatumGetGinTernaryValue(FunctionCall7Coll(key->triConsistentFmgrInfo,
key->collation,
PointerGetDatum(key->entryRes),
UInt16GetDatum(key->strategy),
{
POLYGON *query = PG_GETARG_POLYGON_P(1);
- result = DatumGetBool(DirectFunctionCall5(
- gist_poly_consistent,
+ result = DatumGetBool(DirectFunctionCall5(gist_poly_consistent,
PointerGetDatum(entry),
PolygonPGetDatum(query),
Int16GetDatum(RTOverlapStrategyNumber),
Assert(box->high.x == box->low.x
&& box->high.y == box->low.y);
- result = DatumGetBool(DirectFunctionCall2(
- poly_contain_pt,
+ result = DatumGetBool(DirectFunctionCall2(poly_contain_pt,
PolygonPGetDatum(query),
PointPGetDatum(&box->high)));
*recheck = false;
{
CIRCLE *query = PG_GETARG_CIRCLE_P(1);
- result = DatumGetBool(DirectFunctionCall5(
- gist_circle_consistent,
+ result = DatumGetBool(DirectFunctionCall5(gist_circle_consistent,
PointerGetDatum(entry),
CirclePGetDatum(query),
Int16GetDatum(RTOverlapStrategyNumber),
Assert(box->high.x == box->low.x
&& box->high.y == box->low.y);
- result = DatumGetBool(DirectFunctionCall2(
- circle_contain_pt,
+ result = DatumGetBool(DirectFunctionCall2(circle_contain_pt,
CirclePGetDatum(query),
PointPGetDatum(&box->high)));
*recheck = false;
/* if the xmax changed in the meantime, start over */
if (xmax_infomask_changed(tuple->t_data->t_infomask, infomask) ||
- !TransactionIdEquals(
- HeapTupleHeaderGetRawXmax(tuple->t_data),
+ !TransactionIdEquals(HeapTupleHeaderGetRawXmax(tuple->t_data),
xwait))
goto l3;
/* otherwise, we're good */
xact_desc_relations(buf, "rels", parsed.nrels, parsed.xnodes);
xact_desc_subxacts(buf, parsed.nsubxacts, parsed.subxacts);
- standby_desc_invalidations(
- buf, parsed.nmsgs, parsed.msgs, parsed.dbId, parsed.tsId,
- XactCompletionRelcacheInitFileInval(parsed.xinfo));
+ standby_desc_invalidations(buf, parsed.nmsgs, parsed.msgs, parsed.dbId,
+ parsed.tsId,
+ XactCompletionRelcacheInitFileInval(parsed.xinfo));
if (XactCompletionForceSyncCommit(parsed.xinfo))
appendStringInfoString(buf, "; sync");
parsed.abortnodes);
xact_desc_subxacts(buf, parsed.nsubxacts, parsed.subxacts);
- standby_desc_invalidations(
- buf, parsed.nmsgs, parsed.msgs, parsed.dbId, parsed.tsId,
- xlrec->initfileinval);
+ standby_desc_invalidations(buf, parsed.nmsgs, parsed.msgs, parsed.dbId,
+ parsed.tsId, xlrec->initfileinval);
}
static void
{
/* collect node pointers */
SpGistNodeTuple node;
- SpGistNodeTuple *nodes = (SpGistNodeTuple *) palloc(
- sizeof(SpGistNodeTuple) * nNodes);
+ SpGistNodeTuple *nodes = (SpGistNodeTuple *) palloc(sizeof(SpGistNodeTuple) * nNodes);
SGITITERATE(innerTuple, i, node)
{
* bits set on changes made by transactions that haven't yet
* recovered. It's unlikely but it's good to be safe.
*/
- TransactionIdAsyncCommitTree(
- xid, parsed->nsubxacts, parsed->subxacts, lsn);
+ TransactionIdAsyncCommitTree(xid, parsed->nsubxacts, parsed->subxacts, lsn);
/*
* We must mark clog before we update the ProcArray.
*/
- ExpireTreeKnownAssignedTransactionIds(
- xid, parsed->nsubxacts, parsed->subxacts, max_xid);
+ ExpireTreeKnownAssignedTransactionIds(xid, parsed->nsubxacts, parsed->subxacts, max_xid);
/*
* Send any cache invalidations attached to the commit. We must
* maintain the same order of invalidation then release locks as
* occurs in CommitTransaction().
*/
- ProcessCommittedInvalidationMessages(
- parsed->msgs, parsed->nmsgs,
+ ProcessCommittedInvalidationMessages(parsed->msgs, parsed->nmsgs,
XactCompletionRelcacheInitFileInval(parsed->xinfo),
parsed->dbId, parsed->tsId);
/*
* We must update the ProcArray after we have marked clog.
*/
- ExpireTreeKnownAssignedTransactionIds(
- xid, parsed->nsubxacts, parsed->subxacts, max_xid);
+ ExpireTreeKnownAssignedTransactionIds(xid, parsed->nsubxacts, parsed->subxacts, max_xid);
/*
* There are no invalidation messages to send or undo.
else
{
/* otherwise make a one-element array of the value */
- missingval = PointerGetDatum(
- construct_array(&missingval,
+ missingval = PointerGetDatum(construct_array(&missingval,
1,
defAttStruct->atttypid,
defAttStruct->attlen,
/* command tag */
values[i++] = CStringGetTextDatum(CreateCommandTag(cmd->parsetree));
/* object_type */
- values[i++] = CStringGetTextDatum(stringify_adefprivs_objtype(
- cmd->d.defprivs.objtype));
+ values[i++] = CStringGetTextDatum(stringify_adefprivs_objtype(cmd->d.defprivs.objtype));
/* schema */
nulls[i++] = true;
/* identity */
values[i++] = CStringGetTextDatum(cmd->d.grant.istmt->is_grant ?
"GRANT" : "REVOKE");
/* object_type */
- values[i++] = CStringGetTextDatum(stringify_grant_objtype(
- cmd->d.grant.istmt->objtype));
+ values[i++] = CStringGetTextDatum(stringify_grant_objtype(cmd->d.grant.istmt->objtype));
/* schema */
nulls[i++] = true;
/* identity */
attTup->attbyval,
attTup->attalign,
&isNull);
- missingval = PointerGetDatum(
- construct_array(&missingval,
+ missingval = PointerGetDatum(construct_array(&missingval,
1,
targettype,
tform->typlen,
return;
value = argvalue[0];
- *op->resvalue = PointerGetDatum(
- xmltotext_with_xmloption(DatumGetXmlP(value),
+ *op->resvalue = PointerGetDatum(xmltotext_with_xmloption(DatumGetXmlP(value),
xexpr->xmloption));
*op->resnull = false;
}
* that the agg's input type is binary-compatible with its transtype, so
* straight copy here is OK.)
*/
- oldContext = MemoryContextSwitchTo(
- aggstate->curaggcontext->ecxt_per_tuple_memory);
+ oldContext = MemoryContextSwitchTo(aggstate->curaggcontext->ecxt_per_tuple_memory);
pergroup->transValue = datumCopy(fcinfo->args[1].value,
pertrans->transtypeByVal,
pertrans->transtypeLen);
{
MemoryContext oldContext;
- oldContext = MemoryContextSwitchTo(
- aggstate->curaggcontext->ecxt_per_tuple_memory);
+ oldContext = MemoryContextSwitchTo(aggstate->curaggcontext->ecxt_per_tuple_memory);
pergroupstate->transValue = datumCopy(pertrans->initValue,
pertrans->transtypeByVal,
pertrans->transtypeLen);
* We must copy the datum into aggcontext if it is pass-by-ref. We
* do not need to pfree the old transValue, since it's NULL.
*/
- oldContext = MemoryContextSwitchTo(
- aggstate->curaggcontext->ecxt_per_tuple_memory);
+ oldContext = MemoryContextSwitchTo(aggstate->curaggcontext->ecxt_per_tuple_memory);
pergroupstate->transValue = datumCopy(fcinfo->args[1].value,
pertrans->transtypeByVal,
pertrans->transtypeLen);
*/
#ifdef ENABLE_SSPI
typedef SECURITY_STATUS
- (WINAPI * QUERY_SECURITY_CONTEXT_TOKEN_FN) (
- PCtxtHandle, void **);
+ (WINAPI * QUERY_SECURITY_CONTEXT_TOKEN_FN) (PCtxtHandle, void **);
static int pg_SSPI_recvauth(Port *port);
static int pg_SSPI_make_upn(char *accountname,
size_t accountnamesize,
elog(DEBUG4, "processing received GSS token of length %u",
(unsigned int) gbuf.length);
- maj_stat = gss_accept_sec_context(
- &min_stat,
+ maj_stat = gss_accept_sec_context(&min_stat,
&port->gss->ctx,
port->gss->cred,
&gbuf,
if (save_jointype == JOIN_UNIQUE_INNER)
return;
- inner_cheapest_total = get_cheapest_parallel_safe_total_inner(
- innerrel->pathlist);
+ inner_cheapest_total = get_cheapest_parallel_safe_total_inner(innerrel->pathlist);
}
if (inner_cheapest_total)
bitmap_subplan_mark_shared(Plan *plan)
{
if (IsA(plan, BitmapAnd))
- bitmap_subplan_mark_shared(
- linitial(((BitmapAnd *) plan)->bitmapplans));
+ bitmap_subplan_mark_shared(linitial(((BitmapAnd *) plan)->bitmapplans));
else if (IsA(plan, BitmapOr))
{
((BitmapOr *) plan)->isshared = true;
- bitmap_subplan_mark_shared(
- linitial(((BitmapOr *) plan)->bitmapplans));
+ bitmap_subplan_mark_shared(linitial(((BitmapOr *) plan)->bitmapplans));
}
else if (IsA(plan, BitmapIndexScan))
((BitmapIndexScan *) plan)->isshared = true;
break;
case PGSTAT_MTYPE_RESETSHAREDCOUNTER:
- pgstat_recv_resetsharedcounter(
- &msg.msg_resetsharedcounter,
+ pgstat_recv_resetsharedcounter(&msg.msg_resetsharedcounter,
len);
break;
case PGSTAT_MTYPE_RESETSINGLECOUNTER:
- pgstat_recv_resetsinglecounter(
- &msg.msg_resetsinglecounter,
+ pgstat_recv_resetsinglecounter(&msg.msg_resetsinglecounter,
len);
break;
break;
case PGSTAT_MTYPE_RECOVERYCONFLICT:
- pgstat_recv_recoveryconflict(
- &msg.msg_recoveryconflict,
+ pgstat_recv_recoveryconflict(&msg.msg_recoveryconflict,
len);
break;
break;
case PGSTAT_MTYPE_CHECKSUMFAILURE:
- pgstat_recv_checksum_failure(
- &msg.msg_checksumfailure,
+ pgstat_recv_checksum_failure(&msg.msg_checksumfailure,
len);
break;
false));
/* ick, but cstring_to_text_with_len works for bytea perfectly fine */
- values[2] = PointerGetDatum(
- cstring_to_text_with_len(ctx->out->data, ctx->out->len));
+ values[2] = PointerGetDatum(cstring_to_text_with_len(ctx->out->data, ctx->out->len));
tuplestore_putvalues(p->tupstore, p->tupdesc, values, nulls);
p->returned_rows++;
cchange = dlist_container(ReorderBufferChange, node, it.cur);
ctup = cchange->data.tp.newtuple;
- chunk = DatumGetPointer(
- fastgetattr(&ctup->tuple, 3, toast_desc, &isnull));
+ chunk = DatumGetPointer(fastgetattr(&ctup->tuple, 3, toast_desc, &isnull));
Assert(!isnull);
Assert(!VARATT_IS_EXTERNAL(chunk));
* When the column is renamed, the command tag is created from its
* relation type
*/
- tag = AlterObjectTypeCommandTag(
- ((RenameStmt *) parsetree)->renameType == OBJECT_COLUMN ?
+ tag = AlterObjectTypeCommandTag(((RenameStmt *) parsetree)->renameType == OBJECT_COLUMN ?
((RenameStmt *) parsetree)->relationType :
((RenameStmt *) parsetree)->renameType);
break;
}
else
{
- lexized = (TSLexeme *) DatumGetPointer(
- FunctionCall4(
- &(d->subdict->lexize),
+ lexized = (TSLexeme *) DatumGetPointer(FunctionCall4(&(d->subdict->lexize),
PointerGetDatum(d->subdict->dictData),
PointerGetDatum(inptr->lexeme),
Int32GetDatum(strlen(inptr->lexeme)),
- PointerGetDatum(NULL)
- )
- );
+ PointerGetDatum(NULL)));
}
if (lexized && lexized->lexeme)
{
int res;
- res = tsCompareString(
- ((const ParsedWord *) a)->word, ((const ParsedWord *) a)->len,
+ res = tsCompareString(((const ParsedWord *) a)->word, ((const ParsedWord *) a)->len,
((const ParsedWord *) b)->word, ((const ParsedWord *) b)->len,
false);
ld->dictState.isend = ld->dictState.getnext = false;
ld->dictState.private_state = NULL;
- res = (TSLexeme *) DatumGetPointer(FunctionCall4(
- &(dict->lexize),
+ res = (TSLexeme *) DatumGetPointer(FunctionCall4(&(dict->lexize),
PointerGetDatum(dict->dictData),
PointerGetDatum(curValLemm),
Int32GetDatum(curValLenLemm),
- PointerGetDatum(&ld->dictState)
- ));
+ PointerGetDatum(&ld->dictState)));
if (ld->dictState.getnext)
{
ld->dictState.isend = (curVal->type == 0) ? true : false;
ld->dictState.getnext = false;
- res = (TSLexeme *) DatumGetPointer(FunctionCall4(
- &(dict->lexize),
+ res = (TSLexeme *) DatumGetPointer(FunctionCall4(&(dict->lexize),
PointerGetDatum(dict->dictData),
PointerGetDatum(curVal->lemm),
Int32GetDatum(curVal->lenlemm),
- PointerGetDatum(&ld->dictState)
- ));
+ PointerGetDatum(&ld->dictState)));
if (ld->dictState.getnext)
{
if (IS_ROMAN(&Num))
{
/* Currently don't support int8 conversion to roman... */
- numstr = orgnum = int_to_roman(DatumGetInt32(
- DirectFunctionCall1(int84, Int64GetDatum(value))));
+ numstr = orgnum = int_to_roman(DatumGetInt32(DirectFunctionCall1(int84, Int64GetDatum(value))));
}
else if (IS_EEEE(&Num))
{
if ((dbentry = pgstat_fetch_stat_dbentry(dbid)) == NULL)
result = 0;
else
- result = (int64) (
- dbentry->n_conflict_tablespace +
+ result = (int64) (dbentry->n_conflict_tablespace +
dbentry->n_conflict_lock +
dbentry->n_conflict_snapshot +
dbentry->n_conflict_bufferpin +
values[6] = TimestampTzGetDatum(archiver_stats->stat_reset_timestamp);
/* Returns the record as Datum */
- PG_RETURN_DATUM(HeapTupleGetDatum(
- heap_form_tuple(tupdesc, values, nulls)));
+ PG_RETURN_DATUM(HeapTupleGetDatum(heap_form_tuple(tupdesc, values, nulls)));
}
* is RANGESTRAT_CONTAINS_ELEM.
*/
if (strategy != RANGESTRAT_CONTAINS_ELEM)
- empty = RangeIsEmpty(
- DatumGetRangeTypeP(in->scankeys[i].sk_argument));
+ empty = RangeIsEmpty(DatumGetRangeTypeP(in->scankeys[i].sk_argument));
else
empty = false;
* For an ordinary range, use subdiff function between upper
* and lower bound values.
*/
- length = DatumGetFloat8(FunctionCall2Coll(
- &typcache->rng_subdiff_finfo,
+ length = DatumGetFloat8(FunctionCall2Coll(&typcache->rng_subdiff_finfo,
typcache->rng_collation,
upper.val, lower.val));
}
for (i = 0; i < num_hist; i++)
{
- bound_hist_values[i] = PointerGetDatum(range_serialize(
- typcache, &lowers[pos], &uppers[pos], false));
+ bound_hist_values[i] = PointerGetDatum(range_serialize(typcache,
+ &lowers[pos],
+ &uppers[pos],
+ false));
pos += delta;
posfrac += deltafrac;
if (posfrac >= (num_hist - 1))
{
cur_ma_sublink = (SubLink *) lfirst(next_ma_cell);
next_ma_cell = lnext(ma_sublinks, next_ma_cell);
- remaining_ma_columns = count_nonjunk_tlist_entries(
- ((Query *) cur_ma_sublink->subselect)->targetList);
+ remaining_ma_columns = count_nonjunk_tlist_entries(((Query *) cur_ma_sublink->subselect)->targetList);
Assert(((Param *) expr)->paramid ==
((cur_ma_sublink->subLinkId << 16) | 1));
appendStringInfoChar(buf, '(');
timestamp_cmp_internal(result, fctx->finish) >= 0)
{
/* increment current in preparation for next iteration */
- fctx->current = DatumGetTimestamp(
- DirectFunctionCall2(timestamp_pl_interval,
+ fctx->current = DatumGetTimestamp(DirectFunctionCall2(timestamp_pl_interval,
TimestampGetDatum(fctx->current),
PointerGetDatum(&fctx->step)));
timestamp_cmp_internal(result, fctx->finish) >= 0)
{
/* increment current in preparation for next iteration */
- fctx->current = DatumGetTimestampTz(
- DirectFunctionCall2(timestamptz_pl_interval,
+ fctx->current = DatumGetTimestampTz(DirectFunctionCall2(timestamptz_pl_interval,
TimestampTzGetDatum(fctx->current),
PointerGetDatum(&fctx->step)));
if (ISALLTRUE(datum_l) && cache[j].allistrue)
size_alpha = 0;
else
- size_alpha = SIGLENBIT - sizebitvec(
- (cache[j].allistrue) ? GETSIGN(datum_l) : GETSIGN(cache[j].sign)
- );
+ size_alpha = SIGLENBIT - sizebitvec((cache[j].allistrue) ?
+ GETSIGN(datum_l) :
+ GETSIGN(cache[j].sign));
}
else
size_alpha = hemdistsign(cache[j].sign, GETSIGN(datum_l));
if (ISALLTRUE(datum_r) && cache[j].allistrue)
size_beta = 0;
else
- size_beta = SIGLENBIT - sizebitvec(
- (cache[j].allistrue) ? GETSIGN(datum_r) : GETSIGN(cache[j].sign)
- );
+ size_beta = SIGLENBIT - sizebitvec((cache[j].allistrue) ?
+ GETSIGN(datum_r) :
+ GETSIGN(cache[j].sign));
}
else
size_beta = hemdistsign(cache[j].sign, GETSIGN(datum_r));
Datum
tsquery_phrase(PG_FUNCTION_ARGS)
{
- PG_RETURN_POINTER(DirectFunctionCall3(
- tsquery_phrase_distance,
+ PG_RETURN_POINTER(DirectFunctionCall3(tsquery_phrase_distance,
PG_GETARG_DATUM(0),
PG_GETARG_DATUM(1),
Int32GetDatum(1)));
Datum
tsq_mcontained(PG_FUNCTION_ARGS)
{
- PG_RETURN_DATUM(
- DirectFunctionCall2(
- tsq_mcontains,
+ PG_RETURN_DATUM(DirectFunctionCall2(tsq_mcontains,
PG_GETARG_DATUM(1),
- PG_GETARG_DATUM(0)
- )
- );
+ PG_GETARG_DATUM(0)));
}
bool nulls[] = {false, false, false};
Datum values[3];
- values[0] = PointerGetDatum(
- cstring_to_text_with_len(data + arrin[i].pos, arrin[i].len)
- );
+ values[0] = PointerGetDatum(cstring_to_text_with_len(data + arrin[i].pos, arrin[i].len));
if (arrin[i].haspos)
{
{
positions[j] = Int16GetDatum(WEP_GETPOS(posv->pos[j]));
weight = 'D' - WEP_GETWEIGHT(posv->pos[j]);
- weights[j] = PointerGetDatum(
- cstring_to_text_with_len(&weight, 1)
- );
+ weights[j] = PointerGetDatum(cstring_to_text_with_len(&weight,
+ 1));
}
- values[1] = PointerGetDatum(
- construct_array(positions, posv->npos, INT2OID, 2, true, 's'));
- values[2] = PointerGetDatum(
- construct_array(weights, posv->npos, TEXTOID, -1, false, 'i'));
+ values[1] = PointerGetDatum(construct_array(positions, posv->npos,
+ INT2OID, 2, true, 's'));
+ values[2] = PointerGetDatum(construct_array(weights, posv->npos,
+ TEXTOID, -1, false, 'i'));
}
else
{
for (i = 0; i < tsin->size; i++)
{
- elements[i] = PointerGetDatum(
- cstring_to_text_with_len(STRPTR(tsin) + arrin[i].pos, arrin[i].len)
- );
+ elements[i] = PointerGetDatum(cstring_to_text_with_len(STRPTR(tsin) + arrin[i].pos,
+ arrin[i].len));
}
array = construct_array(elements, tsin->size, TEXTOID, -1, false, 'i');
values[16] = TransactionIdGetDatum(ControlFile->checkPointCopy.newestCommitTsXid);
nulls[16] = false;
- values[17] = TimestampTzGetDatum(
- time_t_to_timestamptz(ControlFile->checkPointCopy.time));
+ values[17] = TimestampTzGetDatum(time_t_to_timestamptz(ControlFile->checkPointCopy.time));
nulls[17] = false;
htup = heap_form_tuple(tupdesc, values, nulls);
res = executeQueryOrDie(conn, "%s", query);
if ((os_info.num_old_tablespaces = PQntuples(res)) != 0)
- os_info.old_tablespaces = (char **) pg_malloc(
- os_info.num_old_tablespaces * sizeof(char *));
+ os_info.old_tablespaces =
+ (char **) pg_malloc(os_info.num_old_tablespaces * sizeof(char *));
else
os_info.old_tablespaces = NULL;
{
struct stat statBuf;
- os_info.old_tablespaces[tblnum] = pg_strdup(
- PQgetvalue(res, tblnum, i_spclocation));
+ os_info.old_tablespaces[tblnum] = pg_strdup(PQgetvalue(res, tblnum, i_spclocation));
/*
* Check that the tablespace path exists and is a directory.
void
print_copyright(void)
{
- puts(
- "PostgreSQL Database Management System\n"
+ puts("PostgreSQL Database Management System\n"
"(formerly known as Postgres, then as Postgres95)\n\n"
"Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group\n\n"
"Portions Copyright (c) 1994, The Regents of the University of California\n\n"
"INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY\n"
"AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS\n"
"ON AN \"AS IS\" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO\n"
- "PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.\n"
- );
+ "PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.\n");
}
default:
appendPQExpBufferStr(&conn->errorMessage,
- libpq_gettext(
- "invalid connection state, "
- "probably indicative of memory corruption\n"
- ));
+ libpq_gettext("invalid connection state, probably indicative of memory corruption\n"));
goto error_return;
}
if (!(beresp == 'R' || beresp == 'E'))
{
appendPQExpBuffer(&conn->errorMessage,
- libpq_gettext(
- "expected authentication request from "
- "server, but received %c\n"),
+ libpq_gettext("expected authentication request from server, but received %c\n"),
beresp);
goto error_return;
}
if (beresp == 'R' && (msgLength < 8 || msgLength > 2000))
{
appendPQExpBuffer(&conn->errorMessage,
- libpq_gettext(
- "expected authentication request from "
- "server, but received %c\n"),
+ libpq_gettext("expected authentication request from server, but received %c\n"),
beresp);
goto error_return;
}
p = strchr(url + strlen(LDAP_URL), '/');
if (p == NULL || *(p + 1) == '\0' || *(p + 1) == '?')
{
- printfPQExpBuffer(errorMessage, libpq_gettext(
- "invalid LDAP URL \"%s\": missing distinguished name\n"), purl);
+ printfPQExpBuffer(errorMessage,
+ libpq_gettext("invalid LDAP URL \"%s\": missing distinguished name\n"),
+ purl);
free(url);
return 3;
}
/* attribute */
if ((p = strchr(dn, '?')) == NULL || *(p + 1) == '\0' || *(p + 1) == '?')
{
- printfPQExpBuffer(errorMessage, libpq_gettext(
- "invalid LDAP URL \"%s\": must have exactly one attribute\n"), purl);
+ printfPQExpBuffer(errorMessage,
+ libpq_gettext("invalid LDAP URL \"%s\": must have exactly one attribute\n"),
+ purl);
free(url);
return 3;
}
lport = strtol(portstr, &endptr, 10);
if (*portstr == '\0' || *endptr != '\0' || errno || lport < 0 || lport > 65535)
{
- printfPQExpBuffer(errorMessage, libpq_gettext(
- "invalid LDAP URL \"%s\": invalid port number\n"), purl);
+ printfPQExpBuffer(errorMessage,
+ libpq_gettext("invalid LDAP URL \"%s\": invalid port number\n"),
+ purl);
free(url);
return 3;
}
/* Allow only one attribute */
if (strchr(attrs[0], ',') != NULL)
{
- printfPQExpBuffer(errorMessage, libpq_gettext(
- "invalid LDAP URL \"%s\": must have exactly one attribute\n"), purl);
+ printfPQExpBuffer(errorMessage,
+ libpq_gettext("invalid LDAP URL \"%s\": must have exactly one attribute\n"),
+ purl);
free(url);
return 3;
}
}
else if (ld_is_nl_cr(*p))
{
- printfPQExpBuffer(errorMessage, libpq_gettext(
- "missing \"=\" after \"%s\" in connection info string\n"),
+ printfPQExpBuffer(errorMessage,
+ libpq_gettext("missing \"=\" after \"%s\" in connection info string\n"),
optname);
free(result);
return 3;
}
else if (!ld_is_sp_tab(*p))
{
- printfPQExpBuffer(errorMessage, libpq_gettext(
- "missing \"=\" after \"%s\" in connection info string\n"),
+ printfPQExpBuffer(errorMessage,
+ libpq_gettext("missing \"=\" after \"%s\" in connection info string\n"),
optname);
free(result);
return 3;
if (state == 5 || state == 6)
{
- printfPQExpBuffer(errorMessage, libpq_gettext(
- "unterminated quoted string in connection info string\n"));
+ printfPQExpBuffer(errorMessage,
+ libpq_gettext("unterminated quoted string in connection info string\n"));
return 3;
}
*/
definitelyEOF:
printfPQExpBuffer(&conn->errorMessage,
- libpq_gettext(
- "server closed the connection unexpectedly\n"
+ libpq_gettext("server closed the connection unexpectedly\n"
"\tThis probably means the server terminated abnormally\n"
"\tbefore or while processing the request.\n"));
default:
printfPQExpBuffer(&conn->errorMessage,
- libpq_gettext(
- "invalid setenv state %c, "
- "probably indicative of memory corruption\n"
- ),
+ libpq_gettext("invalid setenv state %c, probably indicative of memory corruption\n"),
conn->setenv_state);
goto error_return;
}
*/
default:
printfPQExpBuffer(&conn->errorMessage,
- libpq_gettext(
- "unexpected response from server; first received character was \"%c\"\n"),
+ libpq_gettext("unexpected response from server; first received character was \"%c\"\n"),
id);
/* build an error result holding the error message */
pqSaveErrorResult(conn);
break;
default:
printfPQExpBuffer(&conn->errorMessage,
- libpq_gettext(
- "unexpected response from server; first received character was \"%c\"\n"),
+ libpq_gettext("unexpected response from server; first received character was \"%c\"\n"),
id);
/* build an error result holding the error message */
pqSaveErrorResult(conn);
handleSyncLoss(PGconn *conn, char id, int msgLength)
{
printfPQExpBuffer(&conn->errorMessage,
- libpq_gettext(
- "lost synchronization with server: got message type \"%c\", length %d\n"),
+ libpq_gettext("lost synchronization with server: got message type \"%c\", length %d\n"),
id, msgLength);
/* build an error result holding the error message */
pqSaveErrorResult(conn);
if (result_errno == EPIPE ||
result_errno == ECONNRESET)
printfPQExpBuffer(&conn->errorMessage,
- libpq_gettext(
- "server closed the connection unexpectedly\n"
+ libpq_gettext("server closed the connection unexpectedly\n"
"\tThis probably means the server terminated abnormally\n"
"\tbefore or while processing the request.\n"));
else
result_errno = SOCK_ERRNO;
if (result_errno == EPIPE || result_errno == ECONNRESET)
printfPQExpBuffer(&conn->errorMessage,
- libpq_gettext(
- "server closed the connection unexpectedly\n"
+ libpq_gettext("server closed the connection unexpectedly\n"
"\tThis probably means the server terminated abnormally\n"
"\tbefore or while processing the request.\n"));
else
if (cn_index >= 0)
{
(*names_examined)++;
- rc = openssl_verify_peer_name_matches_certificate_name(
- conn,
- X509_NAME_ENTRY_get_data(
- X509_NAME_get_entry(subject_name, cn_index)),
+ rc = openssl_verify_peer_name_matches_certificate_name(conn,
+ X509_NAME_ENTRY_get_data(X509_NAME_get_entry(subject_name, cn_index)),
first_name);
}
}
#ifdef ECONNRESET
case ECONNRESET:
printfPQExpBuffer(&conn->errorMessage,
- libpq_gettext(
- "server closed the connection unexpectedly\n"
+ libpq_gettext("server closed the connection unexpectedly\n"
"\tThis probably means the server terminated abnormally\n"
"\tbefore or while processing the request.\n"));
break;
case ECONNRESET:
#endif
printfPQExpBuffer(&conn->errorMessage,
- libpq_gettext(
- "server closed the connection unexpectedly\n"
+ libpq_gettext("server closed the connection unexpectedly\n"
"\tThis probably means the server terminated abnormally\n"
"\tbefore or while processing the request.\n"));
break;
if (!dlls[i].loaded)
{
dlls[i].loaded = 1; /* Only load once */
- dlls[i].handle = (void *) LoadLibraryEx(
- dlls[i].dll_name,
+ dlls[i].handle = (void *) LoadLibraryEx(dlls[i].dll_name,
0,
LOAD_LIBRARY_AS_DATAFILE);
}
| FORMAT_MESSAGE_IGNORE_INSERTS
| (dlls[i].handle ? FORMAT_MESSAGE_FROM_HMODULE : 0);
- success = 0 != FormatMessage(
- flags,
+ success = 0 != FormatMessage(flags,
dlls[i].handle, err,
MAKELANGID(LANG_ENGLISH, SUBLANG_DEFAULT),
strerrbuf, buflen - 64,
- 0
- );
+ 0);
}
if (!success)
tdata = (TriggerData *) fcinfo->context;
tupdesc = tdata->tg_relation->rd_att;
- relid = DatumGetCString(
- DirectFunctionCall1(oidout,
- ObjectIdGetDatum(tdata->tg_relation->rd_id)
- )
- );
+ relid = DatumGetCString(DirectFunctionCall1(oidout,
+ ObjectIdGetDatum(tdata->tg_relation->rd_id)));
hv_store_string(hv, "name", cstr2sv(tdata->tg_trigger->tgname));
hv_store_string(hv, "relid", cstr2sv(relid));
plain_lineno = PyInt_AsLong(lineno);
if (proname == NULL)
- appendStringInfo(
- &tbstr, "\n PL/Python anonymous code block, line %ld, in %s",
+ appendStringInfo(&tbstr, "\n PL/Python anonymous code block, line %ld, in %s",
plain_lineno - 1, fname);
else
- appendStringInfo(
- &tbstr, "\n PL/Python function \"%s\", line %ld, in %s",
+ appendStringInfo(&tbstr, "\n PL/Python function \"%s\", line %ld, in %s",
proname, plain_lineno - 1, fname);
/*
if (strlen(nulls) != qdesc->nargs)
{
Tcl_SetObjResult(interp,
- Tcl_NewStringObj(
- "length of nulls string doesn't match number of arguments",
+ Tcl_NewStringObj("length of nulls string doesn't match number of arguments",
-1));
return TCL_ERROR;
}
if (i >= objc)
{
Tcl_SetObjResult(interp,
- Tcl_NewStringObj(
- "argument list length doesn't match number of arguments for query"
- ,-1));
+ Tcl_NewStringObj("argument list length doesn't match number of arguments for query",
+ -1));
return TCL_ERROR;
}
* and determining the windows version is its self somewhat Windows
* version and development SDK specific...
*/
- pg_get_system_time = (PgGetSystemTimeFn) GetProcAddress(
- GetModuleHandle(TEXT("kernel32.dll")),
+ pg_get_system_time = (PgGetSystemTimeFn) GetProcAddress(GetModuleHandle(TEXT("kernel32.dll")),
"GetSystemTimePreciseAsFileTime");
if (pg_get_system_time == NULL)
{