feat: associate .psql and .pgsql files with the SQL editor#1641
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a84de0d25e
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| <string>psql</string> | ||
| <string>pgsql</string> |
There was a problem hiding this comment.
Route the newly associated extensions
With these extensions advertised in CFBundleDocumentTypes, Finder will now deliver .psql/.pgsql files to AppDelegate.application(_:open:), but the launch path still classifies SQL files only when URLClassifier.classifyFile sees ext == "sql" (TablePro/Core/Services/Infrastructure/URLClassifier.swift). In that double-click/Open With scenario the new extensions are logged as unrecognized and never reach .openSQLFile, so the advertised association does not actually open them in the editor.
Useful? React with 👍 / 👎.
What
Adds
.psqland.pgsqlto the SQL File document type so PostgreSQL script files open in TablePro's SQL editor, the same as.sql.Why
.psql(thepsqlclient) and.pgsql(VS Code's PostgreSQL default) are the conventional extensions for PostgreSQL SQL scripts. They're plain SQL, so they belong under the existingorg.iso.sqltype rather than falling back to a dynamic UTI with no handler. Today double-clicking one of these files doesn't route to TablePro.Changes
TablePro/Info.plist: addpsqlandpgsqltoCFBundleDocumentTypes→CFBundleTypeExtensionsorg.iso.sqlimported-typeUTTypeTagSpecification→public.filename-extensionCHANGELOG.md: note under[Unreleased] → AddedBoth extensions map to the existing
org.iso.sqlUTI — no new UTI or driver work. Scoped deliberately to the standard-SQL Postgres extensions; dialect-specific ones (.hql,.cql) and overloaded ones (.ddl) are intentionally left out.Checklist
plutil -lint)CHANGELOG.mdupdated under[Unreleased]