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

Setting up the database

All the examples in this chapter use a database named mastering_postgis. This database has been created off the postgis template.

The PgSQL on my dev machine listens on port 5434, which is not the default port for the Postgres database (default is 5432); so when using a default DB setup, you may have to adjust some of the examples a bit.

If you need to change the port your db listens on, you should locate the db data directory, where you will find a postgresql.conf file. This is a text file, so you can edit it with an ordinary text editor.
In order to adjust the port, find a port configuration in the Connections and Authentication section.

Schemas are a great way of managing the data and splitting it into meaningful collections. In most scenarios, one will have some production data, archive data, incoming data, and so on sensibly kept in separate schemas. Using additional schemas will depend on your requirements, but we do encourage you to introduce using schemas into your daily practice if you do not yet do so. The following examples import the data into tables defined in the data_import schema.

主站蜘蛛池模板: 怀远县| 辉南县| 五寨县| 绍兴市| 象山县| 玉山县| 乐平市| 长治市| 格尔木市| 卓资县| 乌鲁木齐县| 江口县| 田东县| 梅州市| 扎赉特旗| 玛沁县| 荆州市| 万安县| 墨脱县| 朔州市| 泸西县| 安图县| 梧州市| 科技| 巨野县| 右玉县| 北安市| 龙川县| 商南县| 新营市| 宁河县| 安泽县| 揭阳市| 乐至县| 太原市| 广西| 平泉县| 林甸县| 明水县| 屏边| 嵊州市|