# PostgreSQL [PostgreSQL](https://www.postgresql.org/) can either be used as a data source or a data destination in Mitto. Mitto's own internal database is PostgreSQL. .. image:: assets/postgresql__connection.png Source plugin example: [Query](/jobs/query/) Destination plugin examples: [CSV](/jobs/csv/), [Salesforce](/connectors/salesforce/), [SQL](/jobs/sql/) ## PostgreSQL as a data destination - Mitto automatically creates the PostgreSQL database schema if it doesn't exist - Mitto automatically creates the PostgreSQL database tables if they don't exist - Mitto automatically determines data types for PostgreSQL columns - Mitto automatically adds new columns to PostgreSQL tables based on new fields in source systems - Mitto automatically adjusts PostgreSQL tables based on changes in source data ## PostgreSQL specific setup Below is the [database url](/databases/database-urls/) structure for connecting to a PostgreSQL database: `postgresql://:@/` When using Mitto's internal PostgreSQL database as a destination, the database url structure is: `postgresql://mitto:@db/analytics` Here's an example of using a PostgreSQL database as a destination in a [CSV](/jobs/csv/) job: .. image:: assets/postgresql__output.png :alt: CSV to Postgres .. NOTE:: When outputting to a PostgreSQL database, leaving the "Schema" blank will create a table in the **public** schema. ## SQL Mitto can send [SQL](/jobs/sql/) statements to a PostgreSQL database. Use PostgreSQL syntax in these Mitto SQL jobs.