mirror of https://github.com/citusdata/citus.git
5983a4c - Introduce CompactAttribute array in TupleDesc
parent
dfe5ae1e7a
commit
7e553fe7db
|
@ -645,10 +645,10 @@ SaveStripeSkipList(RelFileLocator relfilelocator, uint64 stripe,
|
|||
{
|
||||
values[Anum_columnar_chunk_minimum_value - 1] =
|
||||
PointerGetDatum(DatumToBytea(chunk->minimumValue,
|
||||
&tupleDescriptor->attrs[columnIndex]));
|
||||
Attr(tupleDescriptor, columnIndex)));
|
||||
values[Anum_columnar_chunk_maximum_value - 1] =
|
||||
PointerGetDatum(DatumToBytea(chunk->maximumValue,
|
||||
&tupleDescriptor->attrs[columnIndex]));
|
||||
Attr(tupleDescriptor, columnIndex)));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -803,9 +803,9 @@ ReadStripeSkipList(RelFileLocator relfilelocator, uint64 stripe,
|
|||
datumArray[Anum_columnar_chunk_maximum_value - 1]);
|
||||
|
||||
chunk->minimumValue =
|
||||
ByteaToDatum(minValue, &tupleDescriptor->attrs[columnIndex]);
|
||||
ByteaToDatum(minValue, Attr(tupleDescriptor, columnIndex));
|
||||
chunk->maximumValue =
|
||||
ByteaToDatum(maxValue, &tupleDescriptor->attrs[columnIndex]);
|
||||
ByteaToDatum(maxValue, Attr(tupleDescriptor, columnIndex));
|
||||
|
||||
chunk->hasMinMax = true;
|
||||
}
|
||||
|
|
|
@ -9,14 +9,27 @@
|
|||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef COLUMNAR_COMPAT_H
|
||||
#define COLUMNAR_COMPAT_H
|
||||
#ifndef COLUMNAR_VERSION_COMPAT_H
|
||||
#define COLUMNAR_VERSION_COMPAT_H
|
||||
|
||||
#include "pg_version_constants.h"
|
||||
|
||||
/* for PG_VERSION_NUM and TupleDescAttr() */
|
||||
#include "postgres.h"
|
||||
#include "access/htup_details.h"
|
||||
|
||||
|
||||
#define ACLCHECK_OBJECT_TABLE OBJECT_TABLE
|
||||
|
||||
#define ExplainPropertyLong(qlabel, value, es) \
|
||||
ExplainPropertyInteger(qlabel, NULL, value, es)
|
||||
|
||||
|
||||
/* tuple-descriptor attributes moved in PostgreSQL 18: */
|
||||
#if PG_VERSION_NUM >= 180000
|
||||
# define Attr(tupdesc, colno) TupleDescAttr((tupdesc), (colno))
|
||||
#else
|
||||
# define Attr(tupdesc, colno) ((tupdesc)->attrs[(colno)])
|
||||
#endif
|
||||
|
||||
#endif /* COLUMNAR_COMPAT_H */
|
||||
|
|
Loading…
Reference in New Issue