pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Wetmore, Matthew (CTR) <Matthew.Wetmore@express-scripts.com>
To: Rajesh Kumar <rajeshkumar.dba09@gmail.com>
To: pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>
Subject: Automate to rename table
Date: Wed, 9 Aug 2023 20:49:48 +0000
Message-ID: <a4aa1ded524e423ca3ebbd0fea723315@express-scripts.com> (raw)
In-Reply-To: <CAJk5AtaNKtSp2thxJd56j=he15aHHeUbW7tmnhYhY_1iiKG9OA@mail.gmail.com>
References: <CAJk5AtaNKtSp2thxJd56j=he15aHHeUbW7tmnhYhY_1iiKG9OA@mail.gmail.com>

Simple CRON entry with a script that runs a psql command

You can:

alter table rename
Or
create table x as select * from original table.

Depending on you DDL needs or permissions/setup

From: Rajesh Kumar <rajeshkumar.dba09@gmail.com>
Sent: Wednesday, August 9, 2023 1:39 PM
To: pgsql-admin@lists.postgresql.org
Subject: [EXTERNAL] Automate to rename table

Hi friends,

What is the best way to rename the table name automatically every 30 minutes?



view thread (11+ messages)  latest in thread

Message-ID: <a4aa1ded524e423ca3ebbd0fea723315@express-scripts.com>
Permalink:  ../a4aa1ded524e423ca3ebbd0fea723315@express-scripts.com/
Also on:    postgresql.org/message-id/a4aa1ded524e423ca3ebbd0fea723315@express-scripts.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: Matthew.Wetmore@express-scripts.com, rajeshkumar.dba09@gmail.com, pgsql-admin@lists.postgresql.org
  Subject: Re: Automate to rename table
  In-Reply-To: <a4aa1ded524e423ca3ebbd0fea723315@express-scripts.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox