On 2016/12/07 15:26, Craig Ringer wrote: > On 7 December 2016 at 07:29, legrand legrand > <legrand_legr...@hotmail.com> wrote: > >> Working in a DSS environment, we often need to truncate table partitions >> regarding a WHERE condition and have to >> [...] >> Would be pleased to ear your feedback regarding this. > > It sounds like something that'd be useful to do on top of declarative > partitioning, once that is merged. Perhaps you could start by reading > and testing the declarative partitioning patch. That'll give you a > better idea of the practicalities of doing what you propose on top of > it, and give you an opportunity to suggest changes to the declarative > partitioning scheme that might make conditional truncate easier later.
Agreed. If I understand the request correctly, TRUNCATE on the parent table (a partitioned table), which currently recurses to *all* child tables (partitions), should have a restricting WHERE clause, right? It would become possible to implement something like that with the new declarative partitioned tables. As Crag mentioned, you can take a look at the discussion about declarative partitioning in the emails linked to at the following page: https://commitfest.postgresql.org/12/611/ Thanks, Amit -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers