Re: PL/pgSQL techniques better than bash for dynamic DO?

2024-04-09 Thread Pavel Stehule
Ășt 9. 4. 2024 v 18:33 odesĂ­latel Ron Johnson napsal: > PG 9.6.11, if relevant, migrating to PG 14 Real Soon Now. > > I must purge the oldest X period of records from 70 tables, every Sunday. > The field name, interval (X days or months) and date (CURRENT_DATE or > CURRENT_TIMESTAMP) varies for

PL/pgSQL techniques better than bash for dynamic DO?

2024-04-09 Thread Ron Johnson
PG 9.6.11, if relevant, migrating to PG 14 Real Soon Now. I must purge the oldest X period of records from 70 tables, every Sunday. The field name, interval (X days or months) and date (CURRENT_DATE or CURRENT_TIMESTAMP) varies for each table. Thus, I put all the relevant data in a tab-separated