776{
778 int rv;
780
781
783
784
785 {
786 AttStatsSlot sslot;
787 rv = get_attstatsslot(&sslot, stats_tuple, stats_kind, InvalidOid,
788 ATTSTATSSLOT_NUMBERS);
789 if ( ! rv ) {
790 POSTGIS_DEBUGF(2, "no slot of kind %d in stats tuple", stats_kind);
791 return NULL;
792 }
793
794
795 nd_stats = palloc(sizeof(float4) * sslot.nnumbers);
796 memcpy(nd_stats, sslot.numbers, sizeof(float4) * sslot.nnumbers);
797
798 free_attstatsslot(&sslot);
799 }
800 return nd_stats;
801}
#define STATISTIC_KIND_2D
#define STATISTIC_KIND_ND