Re: Yaml code - Mailing list pgsql-admin

From Rajesh Kumar
Subject Re: Yaml code
Date
Msg-id CAJk5AtZOCF-q8mtfTFYJ9UnDSwtpFeSHj=bROVitGdj8CMiE7g@mail.gmail.com
Whole thread Raw
In response to Re: Yaml code  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: Yaml code
List pgsql-admin
I am using openshift env and postgres 15.2. I can see cron job for pgbackrest already. Similarly I want to execute certain postgres functions periodically. Creating table was asked as example..

On Wed, 22 Nov 2023, 20:22 David G. Johnston, <david.g.johnston@gmail.com> wrote:
On Wednesday, November 22, 2023, Rajesh Kumar <rajeshkumar.dba09@gmail.com> wrote:
I am using postgres 15.2 version. I want to write a yaml code to run a cron job that creates a table emp(I'd int) every 5mns

This makes no sense…

YAML is markup, it doesn’t run anything.  Something has to interpret the YAML.

I also can’t imagine how creating a fixed table periodically is useful; seems like it should fail every time but the first.  What problem is this supposed to solve?

Anyway, cron itself runs periodically - you don’t run it.  Just have it execute a psql command or bash script that includes using psql.

David J.

pgsql-admin by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Yaml code
Next
From: Rajesh Kumar
Date:
Subject: Re: Pgbouncer