Re: [HACKERS] Partitionning: support for Truncate Table WHERE

2016-12-07 Thread legrand legrand
part; RAISE NOTICE 'Executing: %', v_stmt; EXECUTE v_stmt; END IF; END LOOP; END $$ LANGUAGE plpgsql; ; De : Amit Langote Envoyé : mercredi 7 décembre 2016 06:58:03 À : Craig Ringer; legrand legrand Cc : pgsql-hackers@postgresql.org Objet :

Re: [HACKERS] Partitionning: support for Truncate Table WHERE

2016-12-06 Thread Amit Langote
On 2016/12/07 15:26, Craig Ringer wrote: > On 7 December 2016 at 07:29, legrand legrand > 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 sound

Re: [HACKERS] Partitionning: support for Truncate Table WHERE

2016-12-06 Thread Craig Ringer
On 7 December 2016 at 07:29, legrand legrand 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 decla

[HACKERS] Partitionning: support for Truncate Table WHERE

2016-12-06 Thread legrand legrand
Hello, Working in a DSS environment, we often need to truncate table partitions regarding a WHERE condition and have to: - query the dictionnary to identify thoses partitions, - build SQL statements, - truncate all partitions covered by the WHERE condition - eventually delete the rest ... -