Discover psql command line examples, include the articles, news, trends, analysis and practical advice about psql command line examples on alibabacloud.com
1, command line login database
There are two ways to execute the psql command directly under the system shell, but to enter the PSQL environment first and then connect to the database. Examples are given below:
(1) Direct login
Execute command:
1 Command line logon databaseThere are two ways to execute the psql command directly under the system shell, instead of entering the PSQL environment before connecting to the database. Examples are given below:(1) Direct loginExecute command:psql-h 1
Backup and restore are most important when you are transporting a database. Today, we tested backup and restore using Pg_dumpall.
Backup Restore method: Pg_dump and Pg_restore, first carefully explain these two commands
Back up the database,
Once you have created the database, you can access it:
Terminal program psql , which runs PostgreSQL interaction, allows you to interactively enter, edit, and execute SQL commands.
Create and manage databases using our existing
First, installationNaturally, before you can start using PostgreSQL, you must install it. PostgreSQL is probably already installed on your node because it may be included in the release of your operating system, or the system administrator has
PostgreSQL has become the first choice for open source relational databases since it was acquired by Oracle. This article introduces the installation and basic usage of PostgreSQL for the first time users. The following content is based on the
: Network Disk DownloadContent Profile ...This book will help you understand and use the PostgreSQL open source database system. Not only will you learn about enterprise features in versions 9.2, 9.3, and 9.4, but you'll also find that PostgreSQL is
Have you ever accidentally deleted a database table or damaged the disk where the database is stored? If you encounter this situation, I believe you will feel very frustrated, because the results of your hard work for a few weeks may be overwhelmed.
(1) User PracticalityProgram:
Createdb creates a new PostgreSQL database (same as SQL statement: Create Database)
Createuser creates a new PostgreSQL user (same as SQL statement: create user)
Dropdb deletes a database
Dropuser: delete a user
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.