Installation and preliminary use of postgresql

Source: Internet
Author: User

I am now studying PostgreSQL. I don't know if this database is not very cognitive in China. Therefore, Google search is basically written in English. From the perspective of an Oracle practitioner, to play a database, you must first install the software, and then open the black boxCodeGo in, create a database, and check the number or something.

The two tables are separated. Now I will share some of my notes after installation.

The installation under Windows is actually very simple. After selecting the installation path, you can continue the next step. The last option to install this one can be ignored. After all, I am just a database developer.

After installation, you can start to use it. According to Oracle's thinking, it should be to open a Black Box. First, use the operating system verification to go in with sysdba, then create a tablespace, create a user, grant permissions, and use the new user to go in and create a table, insert number, select. Step by step.

First, open the black box and log in as a Super User. It should be noted that, unlike Oracle, it seems that you cannot use OS authentication to log on as a Super User. You can only use the executable file createuser that comes with the bin to create a user.

The password must be entered at one step during installation. This password is the default Super User, Postgres. To create a new user, connect to the user first. Therefore, the parameter-u in the red box is displayed. The user I created is wings, and-P is used to require the system to create a password after the user is created. The final password is entered by the Postgres user.

After the account number is created, the database should be created. If yes, a tablespace should be created first. But I don't know how to create it. Let's talk about it later. Create a database first. The database creation contains a createdb executable file, which is used:

Create this library under the wings user. In Oracle, if a user logs on to sqlplus and creates a database, the database belongs to the user. There is a built-in management software adminiii, which is quite easy to use. You can see if the database has been successfully established:

 

You can see that the database is created as expected.

Next, enter the table creation command in the black box and insert the number. This adminiii can also be done. In addition, the graphical interface is much better, and it will not be difficult to make changes after an error occurs.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.