摘要:
删除约束: alter table drop constraint 约束名; 修改表名: alter table schema_name.table_name rename to table_name; 创建存储过程: CREATE OR REPLACE FUNCTION 函数名(参数) RETUR 阅读全文
posted @ 2019-02-12 23:58
epiphanyy
阅读(28)
评论(0)
推荐(0)
摘要:
切换数据库: \c 数据库名 desc表(也能查约束条件): \d schema_name.table_name 列出所有数据库: \l 列出库中某schema中所有表: \dt schema.* //如省略schemam.,则默认列出public schema下的表 阅读全文
posted @ 2019-02-12 23:48
epiphanyy
阅读(10)
评论(0)
推荐(0)
摘要:
template0和template1为postgresql数据库的模板数据库,新建的数据库默认使用template1作为模板。template0和template1的区别在于template0无法修改,因此你可以修改template1数据库以定制新创建的数据库。 template数据库无法被删除( 阅读全文
posted @ 2019-02-12 23:39
epiphanyy
阅读(47)
评论(0)
推荐(0)
摘要:
执行以下命令: ps aux | grep postgres 如出现postgres: wal receiver process说明此节点的数据库处于从服务器状态,无法进行修改。 阅读全文
posted @ 2019-02-12 23:11
epiphanyy
阅读(28)
评论(0)
推荐(0)