postgres由user-----database----schema-----table

因为schema是隶属于某个database的,所以创建后不能修改这个schema到新的一个database上

1   create user abc password '123456' ;

2   create database abcdb with owner='abc';

3   \c abcdb abc;

4   create schema abc authorization abc;(drop schem xxx cascade)

5   create table abc.test(id int);

猜你喜欢

转载自blog.51cto.com/2012ivan/2536952