linux命令
INITDB Section: PostgreSQL Server Applications (1) Updated: 2003-11-02 Index Return to Main Contents
NAME initdb -创建一个新的 PostgreSQL数据库集群
SYNOPSIS initdb[ option...] -- pgdata| - D directory --pgdata
DESCRIPTION描述 initdb创建一个新的 PostgreSQL数据库集群。一个数据库集群是由单个服务器实例管理的数据库集合。创建数据库系统包括创建数据库数据的宿主目录,生成共享的系统表(不属于任何特定数据库的表)和创建 template1数据库。当你以后再创建一个新数据库时, template1数据库里所有内容都会拷贝过来。它包括填充了象内建类型这样的系统表。 initdb初始化该数据库集群的缺省区域和字符集编码。有些区域范畴对该集群而言是全生命期固定的,因此在运行 initdb的时候选取正确的是非常重要的。其它区域范畴可以在服务器启动之后的时间里改变。 initdb将把那些区域设置写到 postgresql.conf配置文件,这样它们就是缺省的,但是我们可以通过编辑那些文件来修改它们。要设置 initdb使用的区域,参阅 --locale选项的描述。字符集编码可以在数据库创建的时候独立设置。 initdb决定 template1数据库的编码,而该编码将成为所有其它数据库的缺省。要修改缺省编码,我们可以使用 -- encoding选项。 --encoding initdb必须以运行数据库服务器进程的用户身份运行它。因为服务器需要能够访问 initdb创建的文件和目录。因为服务器不能以 root身份运行,所以你也不能以 root身份运行 initdb。(实际上它拒绝以 root身份运行。)尽管initdb会尝试创建相应的数据目录,但经常会发生它没有权限做这些事情的情况。因为所需要的目录的父目录通常是 root所有的目录。要为此安排做一个设置,用 root创建一个空数据目录,然后用 chown把该目录的所有权交给数据库用户帐号,然后 su成数据库用户,最后以数据库用户身份运行 initdb。
OPTIONS选项 - D directory -- pgdata= directory --pgdata=这个选项声明数据库集群应该存放在哪个目录。这是initdb需要的唯一信息,但是你可以通过设置 PGDATA环境变量来避免键入,这样做可能方便一些,因为稍后数据库服务器(postmaster)可以通过同一个变量找到数据库目录。 - E encoding -- encoding= encoding --encoding=

alter_group__linux命令中文解释.html_IT/计算机_专业资料。linux命令ALTER GROUP Section: SQL Commands (7) Updated: 2003-11-02 Index Return to Main ...
alter_database__linux命令中文解释.html_IT/计算机_专业资料。linux命令ALTER DATABASE Section: SQL Commands (7) Updated: 2003-11-02 Index Return to Main ...
create_function__linux命令中文解释.html_IT/计算机_专业资料。linux命令CREATE FUNCTION Section: SQL Commands (7) Updated: 2003-11-02 Index Return to Main...
create_database__linux命令中文解释.html_IT/计算机_专业资料。linux命令CREATE DATABASE Section: SQL Commands (7) Updated: 2003-11-02 Index Return to Main...
dropdb__linux命令中文解释.html_IT/计算机_专业资料。linux命令DROPDB Section: PostgreSQL Client Applications (1) Updated: 2003-11-02 Index Return to Main ...
createdb__linux命令中文解释.html_IT/计算机_专业资料。linux命令CREATEDB Section: PostgreSQL Client Applications (1) Updated: 2003-11-02 Index Return to ...
Http__linux命令中文解释.html_IT/计算机_专业资料。linux命令Http Section: Tcl Built-In Commands (3tcl) Updated: 8.3 Index Return to Main Contents NAME...
load.7.html__linux命令中文解释.html_IT/计算机_专业资料 暂无评价0人阅读0次下载举报文档 load.7.html__linux命令中文解释.html_IT/计算机_专业资料。...
ecpg__linux命令中文解释.html_IT/计算机_专业资料。linux命令ECPG Section: PostgreSQL Client Applications (1) Updated: 2003-11-02 Index Return to Main ...
热门文档