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