摘要:install postgresql in ubuntu
使用apt-get install postgresql-9.3無法安裝
In Ubuntu official repositories only PostgreSQL 9.1 is available.
n order to get PostgreSQL v9.2 in your VPS using apt you should follow the official PostgreSQL procedure for Ubuntu found here
It consists of adding PostgreSQL official repository as one of your repository source
-
Create the file
/etc/apt/sources.list.d/pgdg.list
-
Insert this line
deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main
-
Import the repository signing key
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
-
Refresh your repositories cache
sudo apt-get update
Now you can simply do sudo apt-get install postgresql-9.2
一:CREATE DATABASE 語法 (Syntax)
=====================================
CREATE DATABASE database_name;
CREATE DATABASE 敘述句實例 (Example)
假設我們想建立一個叫做「mydatabase」的資料庫:
CREATE DATABASE mydatabase;