Re: Loading test data into a PostgreSQL database

From: Simon Connah <simon(dot)n(dot)connah(at)protonmail(dot)com>
To: Jayadevan M <maymala(dot)jayadevan(at)gmail(dot)com>
Cc: "pgsql-novice(at)lists(dot)postgresql(dot)org" <pgsql-novice(at)lists(dot)postgresql(dot)org>
Subject: Re: Loading test data into a PostgreSQL database
Date: 2021-05-16 19:02:36
Message-ID: iv-642JSwpg0VRDopXDpQs5Y7GphxoqASGIT8z8b8IP0q3bDKuTppvEUXH8ZoDofqPac5JF7mWH8ue1qF9iOdqot2YmWDLV62f42t0gHuVw=@protonmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Saturday, May 15th, 2021 at 11:49, Jayadevan M <maymala(dot)jayadevan(at)gmail(dot)com> wrote:

> > I'm currently working on a project using PostgreSQL 13 and using an extension with CREATE EXTENSION to create the database. However, if I want to make certain changes to the database, I have to drop the extension and then re-create it (I don't want to update the version number for the initial release). So, what is the normal way of creating some test data to put in the database because obviously, when you do DROP EXTENSION, it deletes everything?
>

> Will using a template database work?  Have your extension and other objects there. When you create your actual database, use the other one as the template.
> https://www.postgresql.org/docs/13/manage-ag-templatedbs.html
>

> Regards,
> Jayadevan

That looks like an interesting thing to look into. I'll have to read through it properly.

Thanks.

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message papapep 2021-05-16 20:26:51 Re: Loading test data into a PostgreSQL database
Previous Message Simon Connah 2021-05-16 19:01:04 Re: Loading test data into a PostgreSQL database