官术网_书友最值得收藏!

PostgreSQL high-level object interaction

To sum up, a PostgreSQL server can contain many databases, programming languages, roles, and tablespaces. Each database has an owner and a default tablespace; a role can be granted permission to access or can own several databases. The settings can be used to control the behavior of the PostgreSQL server on several levels, such as database and session. Finally, a database can use several programming languages:

In order to create a database, one needs to specify the owner and the encoding of the database; if the encoding of template1 does not match the required encoding, template0 should be used explicitly.

For the car web high-level objects interaction portal database, let's assume that the database owner is the car_portal_role role and the encoding is UTF-8. In order to create this database, one can execute the following commands:

CREATE ROLE car_portal_app LOGIN;
CREATE DATABASE car_portal ENCODING 'UTF-8' LC_COLLATE 'en_US.UTF-8' LC_CTYPE 'en_US.UTF-8' TEMPLATE template0 OWNER car_portal_app;
主站蜘蛛池模板: 崇明县| 和顺县| 呼伦贝尔市| 冷水江市| 娄烦县| 肇州县| 铅山县| 始兴县| 郯城县| 新密市| 安溪县| 化德县| 卓资县| 宁陵县| 鸡西市| 洪江市| 明水县| 武强县| 兴和县| 大同市| 金门县| 长治市| 封丘县| 武清区| 揭东县| 昆山市| 长武县| 藁城市| 黎川县| 苍溪县| 海林市| 深州市| 天长市| 丽水市| 庆阳市| 阿克陶县| 临城县| 兴宁市| 福泉市| 海南省| 通许县|