While PostgreSQL is commonly considered an RDBMS, or a "database", it may not be commonly understood what is meant specifically by the word database . A database within PostgreSQL is an object-relational implementation of what is formally called a schema in SQL99 (though there is no practical difference).
Put simply, a database is a stored set of data which is logically interrelated. Typically, this data can be accessed in a multi-user environment. This is the case with PostgreSQL, though there are well-defined rights and restrictions enforced with that access.
What may not be commonly understood is that PostgreSQL can at one time have several databases concurrently available, each with their own owner, and each with their own unique tables, views, indices, sequences and functions.
In order to create a table, function, or any other database object, you must be connected to a specific database via a PostgreSQL client . Once connected, an object can be created, which is then owned by the connected database, and will be therefore inaccessible from any other database (though a client may have several connections open to different databases).
By keeping fundamental data objects segregated into their own databases in this fashion, you run a smaller risk of running into a naming collision by choosing a table name already chosen for another purpose (e.g., if two users each wanted to have a table called "products" for two separate applications). This is because neither database has any knowledge of the other database's components, and will not attempt to make any kind of logical relationship between them. Furthermore, as the same rule applies to object-relational data objects, users may even create functions and language definitions within their database which are inaccessible by other users connected to other databases running within PostgreSQL.
A default installation of PostgreSQL installs only one functional database, which is called template1 . It is named template1 to represent the template based nature of the database. Any database which is created after it is essentially a clone, inheriting any of its database objects, including table structure, functions, languages, etc. It is not uncommon to create a default database for new PostgreSQL users with the same name as their PostgreSQL username, as PostgreSQL will attempt to connect to a database with the same name as the connecting user if a database name is not specified.