PostgreSQL如何创建数据库或模式的副本? [英] PostgreSQL how to create a copy of a database or schema?
本文介绍了PostgreSQL如何创建数据库或模式的副本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有一种简单的方法在PostgreSQL 8.1中创建数据库或模式的副本吗?
Is there a simple way to create a copy of a database or schema in PostgreSQL 8.1?
我正在测试一些软件,
I'm testing some software which does a lot of updates to a particular schema within a database, and I'd like to make a copy of it so I can run some comparisons against the original.
推荐答案
CREATE DATABASE newdb WITH TEMPLATE olddb;
这篇关于PostgreSQL如何创建数据库或模式的副本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文