Dialogs for File Open and File Save
By default, PCC uses its own dialogs for File Open and File Save (and File Save As). The two dialogs are titled Open SQL Document and Save SQL Document, respectively, because the files that PCC deals with are SQL documents. (For example, File > New creates a SQL document.)
The dialogs allow you to work with files containing character encodings different from the system encoding more easily than with the standard dialogs for open and save. For example, if you create a SQL script that contains wide character data, saving the file without the proper encoding could result in lost data (the system code page in use may not support wide character data, for example).
Note that you can access the standard operating system dialog for file selection by choosing Browse on Open SQL Document or Save SQL Document.
This section covers the following topics:
Encoding Choices
The dialogs allow you to change the file encoding during the open or save action. In addition, the File Open dialog shows a preview of the data based on the selected file encoding. The following table explains the encoding choices.
 
Default Encoding
In addition to changing the file encoding during the open or save action, you can set the default encoding to use for opens and saves. (This is also the default for importing data, exporting data, and exporting a schema. See Importing Data with Import Data Wizard, Exporting Data with Export Data Wizard, and Exporting a Schema). The same default applies for all of these. You cannot set different defaults for the open and save actions, for example.
1
In PCC, select Window > Preferences > PSQL > File Encoding.
2
The choices are explained in Encoding Choices for File Open and File Save Dialogs.
3
*Note: You can also access the File Encoding preferences from the dialogs for File Open, Save File, Import Data, Export Data, and Export Schema. Click Change default encoding in the dialog.
Invalid File Name Characters
The alternate dialogs check for valid characters in a file name before allowing the open or save action. The following set of characters are invalid and cannot be used: / : * ? \ " < > |
To allow a file to be moved between Windows and Linux or OS X, this set of invalid characters is the same for those operating systems.
File Open Dialog (Open SQL Document)
The following image shows the File Open dialog ready to open the demodata.sql sample file provided with PSQL. Note the Preview. The Document field defaults to the location used for the previous File Open or File Save.
You can access the standard operating system file dialog by clicking Browse.
File Save Dialog (Save SQL Document)
The following image shows the File Save dialog. Preview does not apply. The Document field defaults to the location used for the previous File Save or File Open.
A full path and file name is required to save a SQL document. You can access the standard operating system file dialog by clicking Browse.
Using the Standard Operating System Dialogs
If you prefer, you can use the standard operating system dialogs for File Open and File Save. For example, you may have no need to work with encodings outside the system code page, in which case you may want to use the standard dialogs.
1
In PCC, select Window > Preferences > PSQL > File Encoding.
2
Select the option Do not prompt for encoding during File Open and File Save.
3
*Note: You can also access the File Encoding preferences from the dialogs for File Open, Save File, Import Data, Export Data, and Export Schema. Click Change default encoding on the dialog.