Re: Renaming sequences

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Mike Dewhirst <miked(at)dewhirst(dot)com(dot)au>
Cc: Zahid Rahman <zahidr1000(at)gmail(dot)com>, pgsql-novice(at)lists(dot)postgresql(dot)org
Subject: Re: Renaming sequences
Date: 2019-12-18 13:53:08
Message-ID: 20191218135308.GA13103@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On 2019-Dec-18, Mike Dewhirst wrote:

> That sounds promising. I would really like the sequence name aligned
> with the table name. I was thinking of simply editing a dump file and
> reloading to achieve it.Is that a rational approach?

I don't find it so, but it seems subjective ... YMMV.

I would just copy the database (CREATE DATABASE WITH TEMPLATE) to a test
throwaway one, do the ALTER SEQUENCE there, point the application to it,
and see if it works. If it does, drop that database and repeat the
ALTER SEQUENCE in your original database.

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Justin 2019-12-18 14:04:08 Re: Renaming sequences
Previous Message Zahid Rahman 2019-12-18 13:03:26 Re: Re[2]: Health warning: