postgresql/src/include/utils
Tom Lane 0c7d537930 Move estimate_hashagg_tablesize to selfuncs.c, and widen result to double.
It seems to make more sense for this to be in selfuncs.c, since it's
largely a statistical-estimation thing, and it's related to other
functions like estimate_hash_bucket_stats that are there.

While at it, change the result type from Size to double.  Perhaps at one
point it was impossible for the result to overflow an integer, but
I've got no confidence in that proposition anymore.  Nothing's actually
done with the result except to compare it to a work_mem-based limit,
so as long as we don't get an overflow on the way to that comparison,
things should be fine even with very large dNumGroups.

Code movement proposed by Antonin Houska, type change by me

Discussion: https://postgr.es/m/25767.1549359615@localhost
2019-02-21 14:59:12 -05:00
..
.gitignore Rearrange makefile rules for running Gen_fmgrtab.pl. 2018-05-03 17:54:18 -04:00
acl.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
aclchk_internal.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
array.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
arrayaccess.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
ascii.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
attoptcache.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
builtins.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
bytea.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
cash.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
catcache.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
combocid.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
date.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
datetime.h Create the infrastructure for planner support functions. 2019-02-09 18:08:48 -05:00
datum.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
dsa.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
dynahash.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
elog.h Fix misleading PG_RE_THROW commentary 2019-02-11 15:56:09 -03:00
evtcache.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
expandeddatum.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
expandedrecord.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
float.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
fmgrtab.h Reduce the size of the fmgr_builtin_oid_index[] array. 2019-01-09 15:22:43 -05:00
formatting.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
freepage.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
geo_decls.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
guc.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
guc_tables.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
hashutils.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
help_config.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
hsearch.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
index_selfuncs.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
inet.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
int8.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
inval.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
json.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
jsonapi.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
jsonb.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
logtape.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
lsyscache.h Build out the planner support function infrastructure. 2019-02-09 18:32:23 -05:00
memdebug.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
memutils.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
numeric.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
palloc.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
partcache.h Move code for managing PartitionDescs into a new file, partdesc.c 2019-02-21 11:45:02 -05:00
pg_crc.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
pg_locale.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
pg_lsn.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
pg_rusage.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
pidfile.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
plancache.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
portal.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
ps_status.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
queryenvironment.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
rangetypes.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
regproc.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
rel.h Rename RelationData.rd_amroutine to rd_indam. 2019-01-21 17:36:55 -08:00
relcache.h Finish reverting "recheck_on_update" patch. 2019-01-15 12:07:10 -05:00
relfilenodemap.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
relmapper.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
relptr.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
reltrigger.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
resowner.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
resowner_private.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
rls.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
ruleutils.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
sampling.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
selfuncs.h Move estimate_hashagg_tablesize to selfuncs.c, and widen result to double. 2019-02-21 14:59:12 -05:00
sharedtuplestore.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
snapmgr.h Move generic snapshot related code from tqual.h to snapmgr.h. 2019-01-21 17:06:41 -08:00
snapshot.h Move remaining code from tqual.[ch] to heapam.h / heapam_visibility.c. 2019-01-21 17:07:10 -08:00
sortsupport.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
spccache.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
syscache.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
timeout.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
timestamp.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
tuplesort.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
tuplestore.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
typcache.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
tzparser.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
uuid.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
varbit.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
varlena.h Fix C++ compile failures in headers. 2019-01-10 14:07:01 -05:00
xml.h Update copyright for 2019 2019-01-02 12:44:25 -05:00