tvondra / tdigest

PostgreSQL extension for estimating percentiles using t-digest
PostgreSQL License
87 stars 13 forks source link

Feature request: bulk initialize of tdigest #18

Closed naude-r closed 3 years ago

naude-r commented 3 years ago

currently tdigest_add can be used to perform a bulk update. Would it make sense to also provide a tdigest bulk construction api?

e.g. select tdigest(ARRAY[....], 100);

the reason is that one can more easily perform "insert....ON CONFLICT.....DO UPDATE" type statements will maintaining the bulk operations for both create/insert and update.

apologies if this is supported in some other way.

naude-r commented 3 years ago

realized after re-reading the documention that tdigest_add can be called with a null tdigest instance, which acts like a create.