dependencies->type, STATS_DEPS_TYPE_BASIC);
if (dependencies->ndeps == 0)
- ereport(ERROR,
- (errcode(ERRCODE_DATA_CORRUPTED),
- errmsg("invalid zero-length item array in MVDependencies")));
+ elog(ERROR, "invalid zero-length item array in MVDependencies");
/* what minimum bytea size do we expect for those parameters */
min_expected_size = SizeOfDependencies +
tmp += sizeof(uint32);
if (ndist.magic != STATS_NDISTINCT_MAGIC)
- ereport(ERROR,
- (errcode(ERRCODE_DATA_CORRUPTED),
- errmsg("invalid ndistinct magic %08x (expected %08x)",
- ndist.magic, STATS_NDISTINCT_MAGIC)));
+ elog(ERROR, "invalid ndistinct magic %08x (expected %08x)",
+ ndist.magic, STATS_NDISTINCT_MAGIC);
if (ndist.type != STATS_NDISTINCT_TYPE_BASIC)
- ereport(ERROR,
- (errcode(ERRCODE_DATA_CORRUPTED),
- errmsg("invalid ndistinct type %d (expected %d)",
- ndist.type, STATS_NDISTINCT_TYPE_BASIC)));
+ elog(ERROR, "invalid ndistinct type %d (expected %d)",
+ ndist.type, STATS_NDISTINCT_TYPE_BASIC);
if (ndist.nitems == 0)
- ereport(ERROR,
- (errcode(ERRCODE_DATA_CORRUPTED),
- errmsg("invalid zero-length item array in MVNDistinct")));
+ elog(ERROR, "invalid zero-length item array in MVNDistinct");
/* what minimum bytea size do we expect for those parameters */
minimum_size = (SizeOfMVNDistinct +
ndist.nitems * (SizeOfMVNDistinctItem +
sizeof(AttrNumber) * 2));
if (VARSIZE_ANY_EXHDR(data) < minimum_size)
- ereport(ERROR,
- (errcode(ERRCODE_DATA_CORRUPTED),
- errmsg("invalid MVNDistinct size %zd (expected at least %zd)",
- VARSIZE_ANY_EXHDR(data), minimum_size)));
+ elog(ERROR, "invalid MVNDistinct size %zd (expected at least %zd)",
+ VARSIZE_ANY_EXHDR(data), minimum_size);
/*
* Allocate space for the ndistinct items (no space for each item's