PostgresQL basically downloads the PostgreSQL installation package from the official website and executes the installation. After the installation is complete, a new service is created in the windows Service and can be started directly. If the service is not successfully created, you need to start it through the command line. My PG is installed in D: workdb1_sql9.2to execute initdb.exe under the bindirectory.
PostgresQL basically downloads the PostgreSQL installation package from the official website and executes the installation. After the installation is complete, a new service is created in the windows Service and can be started directly. If the service is not successfully created, you need to start it through the command line. My PG is installed in initdb.exe under the bindirectory of D: \ work \ DB \ PostgreSQL \ 9.2.
Basic use of PostgresQL
Download the PostgreSQL installation package from the official website and install it. After installation, a new service is created in the windows Service and can be started directly. If the service is not successfully created, you need to start it through the command line.
My PG is installed in D: \ work \ DB \ PostgreSQL \ 9.2
To execute initdb.exe under the bindirectory, you must provide the data file directory, for example, D: \ work \ DB \ PostgreSQL \ 9.2 \ mydata. You only need to execute this command when you use it for the first time.
Then run pg_ctl start-D "D: \ work \ DB \ PostgreSQL \ 9.2 \ mydata" to start the database.
Then run the PGAdmin3 command to open a simple graphic console, which allows you to conveniently View data and execute SQL.