Getting Started

Using Postico

Troubleshooting

More Information

You are looking at the documentation for Postico v1.2 — would you like to go to the latest version instead?

Importing and Exporting data in Postico

Copy & Paste

Copy & Paste is the most convenient way to import and export data in Postico.

Postico, like most other Mac apps, copies tabular data in "Tab Separated Values" (TSV) format: columns are separated by tabs, and row are separated with newlines. The limitation of this format is that your data can't contain tabs or newlines. Postico replaces these special characters with spaces when you copy data to the clipboard.

You can also copy data in other formats using the "Copy Special" command. Postico offers the following alternative formats for copying: TSV with headers, CSV, CSV with headers, SQL Insert Statements.

Postico also allows pasting data in TSV format. This is great for importing data from spreadsheets in Excel or Numbers, or from MySQL databases using Sequel Pro, or even from tables on websites in Safari.

Here's how to paste data into Postico:

Exporting CSV files

Postico can export tables and query results as "Comma Separated Values" (CSV) files. You can export either a single table, or multiple tables at once.

When exporting the current table (by selecting "Export" from the File menu), all rows in the table will be exported, even though Postico only displays the first page. If filters are active, they will be used, and only filtered rows will be exported.

Make sure the keyboard focus is on the table view when selecting export; otherwise you may end up exporting the selected table in the sidebar.

You can export multiple tables by selecting them in the sidebar or in the grid view (hold down the shift or command keys). Then right-click and chose export from the context menu. When exporting multiple tables, Postico will create a folder containing one CSV file per table.

You can also export query results in the SQL Query view.

CSV Export Settings

Unfortunately CSV is a very losely defined format. Applications implement CSV in very different ways. This fact is made even worse by the fact that apps change behavior depending on your system's language & region settings.

I've examined the CSV file support of popular applications, and I came to the conclusion that most apps understand one of two formats, which I call "International" and "Continental":

Most apps allow using double quotes (") around values that can contain special characters. This allows CSV to store data that contains special characters like the field separator or newlines. Postico also uses quotes:

This produces output compatible with the majority of applications I've tested. However, there are two more settings (mostly for compatibility with Microsoft Excel):