From: | Richard Huxton <dev(at)archonet(dot)com> |
---|---|
To: | Owen Hartnett <owen(at)clipboardinc(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Schema as versioning strategy |
Date: | 2007-04-25 18:05:32 |
Message-ID: | 462F986C.9020702@archonet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
Owen Hartnett wrote:
> I want to "freeze" a snapshot of the database every year (think of end
> of year tax records). However, I want this frozen version (and all the
> previous frozen versions) available to the database user as read-only.
> My thinking is to copy the entire public schema (which is where all the
> current data lives) into a new schema, named 2007 (2008, etc.)
Sounds perfectly reasonable. You could either do it as a series of:
CREATE TABLE archive2007.foo AS SELECT * FROM public.foo;
or do a pg_dump of schema "public", tweak the file to change the schema
names and restore it.
--
Richard Huxton
Archonet Ltd
From | Date | Subject | |
---|---|---|---|
Next Message | Richard Huxton | 2007-04-25 18:06:43 | Re: Stored Procedure Speed |
Previous Message | Tom Lane | 2007-04-25 18:04:16 | Re: Stored Procedure Speed |
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Berkus | 2007-04-25 18:27:13 | Re: [HACKERS] Full page writes improvement, code update |
Previous Message | Tom Lane | 2007-04-25 18:02:22 | Re: ECPG failure on BF member Vaquita (Windows Vista) |