

Specify the database name and comments if any. postgres=# \c database_name Īfter starting PgAdmin, navigate to Databases->Create->Database and specify the details as shown below: To change the database, use the \c command. You can see all the databases listed below.
#BASIC POSTGRESQL TUTORIAL HOW TO#
Section also covers how to list and change databases post creation of a database using the psql shell. The 'CREATE DATABASE' statement is used to create a new database as shown below īefore jumping over to the next topic let us learn some psql commands to list and change databases The following syntax shows how to create a database in PostgreSQL. There are a number of DDL statements you will need to work with PostgreSQL, such as creating, dropping, and working with a database.
#BASIC POSTGRESQL TUTORIAL PASSWORD#
To start pgAdmin4, navigate to start->pgAdmin4 and enter the 'postgres' user password set during installation. To start a SQL Shell terminal, navigate to start->SQL Shell(psql) and enter the credentials set during installation. On Windows, there is a little post installation work. This article covers both the techniques.įor Linux installation refer to this article, Typically there are two methods to execute PostgreSQL queries: The package comes bundled with PostgreSQL server, pgAdmin4 (a GUI tool to manage the database) and a command line tool, psql. This is the link which can be used to download the latest stable version. We need to have PostgreSQL installed in our system. Has NoSQL-style JSON processing features, which makes it compatible to the modern day architecture and design patterns.Data recovery mechanisms are also well supported in PostgreSQL thus making it reliable and secured to use.Uses powerful indexing techniques to deliver strong concurrency and performance.All needed constraints like UNIQUE, NOT NULL, Primary Keys, Foreign Keys and Exclusions are supported Has wide range of datatypes both out of the box and customized.Almost all the features of SQL are supported though sometimes with a slightly different syntax. For example, one can define his own data types, develop custom functions and conform to SQL standard without compromising on architectural designs. PostgreSQL in addition to being free and open source is highly robust and extensible. PostgreSQL databases provide enterprise-class database solutions and are used by a wide variety of enterprises across many industries, like financial services, information technology, government and media & communications. Though originally designed to run on UNIX platforms, PostgreSQL is eligible to run on various platforms such as Linux, macOS, Solaris, and Windows. PostgreSQL is a free and general purpose open source object-relational database system that uses and extends the SQL language.
