postgresql

Default Databases

Information about PostgreSQL's default database systems

PostgreSQL comes with several default databases and schemas that can be useful during SQL injection attacks.

Default Databases

DatabaseDescription
postgresDefault administrative database, always exists
template0Clean template database, cannot be modified
template1Template database used to create new databases

Important Schemas

SchemaDescription
pg_catalogSystem catalog containing metadata about all database objects
information_schemaSQL-standard views for database metadata (portable across DBs)
publicDefault schema where user objects are created

Key System Tables

Table/ViewDescription
pg_databaseList of all databases
pg_userDatabase users
pg_shadowUser passwords (requires superuser)
pg_tablesAll tables in the database
pg_catalog.pg_tablesSystem tables catalog
information_schema.tablesSQL-standard table listing
information_schema.columnsSQL-standard column listing

The information_schema is portable across different database systems, while pg_catalog contains PostgreSQL-specific metadata and is often more detailed.