--- warning: DO NOT CHANGE THIS MANUALLY, THIS IS GENERATED BY https://github.com/duckdb/community-extensions repository, check README there title: pst excerpt: | DuckDB Community Extensions Read and edit in place Microsoft PST files with rich schemas for common MAPI types (emails, contacts, appointments, tasks) extension: name: pst description: Read and edit in place Microsoft PST files with rich schemas for common MAPI types (emails, contacts, appointments, tasks) version: 0.2.1 language: C++ build: cmake excluded_platforms: "windows_amd64_mingw;wasm_mvp;wasm_eh;wasm_threads" license: MIT maintainers: - mach-kernel repo: github: intellekthq/duckdb-pst ref: d0a69a498c7726b7b75ed32616c7feac3271ff55 docs: hello_world: | -- Count all messages across PST files (supports globs) D SELECT count(*) FROM read_pst_messages('enron/*.pst'); ┌────────────────┐ │ count_star() │ │ int64 │ ├────────────────┤ │ 1227193 │ └────────────────┘ -- Query contacts (supports remote URIs) D SELECT given_name, surname FROM read_pst_contacts('https://example.com/outlook.pst'); ┌────────────┬─────────┐ │ given_name │ surname │ │ varchar │ varchar │ ├────────────┼─────────┤ │ John │ Doe │ │ Jane │ Smith │ └────────────┴─────────┘ -- Read messages with limit (applied during planning for large files) D SELECT subject, sender_email_address, message_delivery_time FROM read_pst_messages('*.pst', read_limit=100); -- Preview an in-place delete. Without `really := true` the call -- opens read-only and reports what it would do per row. D SELECT status, count(*) FROM delete_pst_messages( SELECT pst_path, node_id FROM read_pst_messages('/tmp/hr.pst') WHERE sender_email_address = 'terminated@example.com' ) GROUP BY status; ┌───────────┬──────────────┐ │ status │ count_star() │ │ varchar │ int64 │ ├───────────┼──────────────┤ │ PREVIEWED │ 17 │ └───────────┴──────────────┘ extended_description: | A DuckDB extension for reading and editing in place Microsoft PST files, with rich schemas for common MAPI types. Built on Microsoft's official [PST SDK](https://github.com/enrondata/microsoft-pst-sdk). Query emails, contacts, appointments, and more. Use it to analyze PST data in-place (locally or on object storage), import to DuckDB tables, export to Parquet, or delete from a store in place to scrub PII, drop out-of-scope custodian mail before a production, or strip attachments. ### Table Functions | Function | MAPI Class | Description | |-------------------------------|-------------------|----------------------------------------| | `read_pst_folders` | `*` | Folder hierarchy | | `read_pst_messages` | `*` | All messages with base IPM.Note schema | | `read_pst_notes` | `IPM.Note` | Email messages | | `read_pst_contacts` | `IPM.Contact` | Contacts with 78+ fields | | `read_pst_distribution_lists` | `IPM.DistList` | Distribution lists with members | | `read_pst_appointments` | `IPM.Appointment` | Calendar appointments and meetings | | `read_pst_sticky_notes` | `IPM.StickyNote` | Sticky note items | | `read_pst_tasks` | `IPM.Task` | Task items | ### In-place Deletion | Function | Input Table | Deletes | |---------------------------|-----------------------------------------------------------------------------|-------------------------------------------------| | `delete_pst_messages` | `(pst_path VARCHAR, node_id UINTEGER)` | One message, and its attachments | | `delete_pst_folders` | `(pst_path VARCHAR, node_id UINTEGER)` | A folder, its subfolders and everything in them | | `delete_pst_attachments` | `(pst_path VARCHAR, message_node_id UINTEGER, attachment_node_id UINTEGER)` | One attachment, leaving the message | | `wipe_pst_free_space` | a path or glob | Overwrites bytes no node points at | Gated behind `SET pst_allow_delete = true` (session) plus `really := true` per call. Without `really` the call opens read-only, resolves every target, and reports `PREVIEWED` or `FAILED` per row. Bind errors abort the statement; anything found later is reported per row so a mid-statement throw cannot leave already-committed deletes with no record of what went. Node IDs are checked against the mode, so `delete_pst_messages` refuses a folder or the store's root. ### Performance Features - **Query pushdown**: projection and statistics pushdown - **Concurrent planning**: parallel partition planning for directories with many PST files - **Late materialization**: filter on virtual columns before expanding full projections ### Parameters | Parameter | Default | Description | |------------------------|-------------|----------------------------------------------------------| | `read_body_size_bytes` | `1000000` | Max bytes to read into body/body_html (0 for unlimited) | | `read_attachment_body` | `false` | Whether to read attachment bytes | | `read_limit` | `NULL` | Max items to read (applied during planning) | For full schema documentation and usage examples, see the [GitHub repository](https://github.com/intellekthq/duckdb-pst). extension_star_count: 12 extension_star_count_pretty: 12 extension_download_count: 854 extension_download_count_pretty: 854 image: '/images/community_extensions/social_preview/preview_community_extension_pst.png' layout: community_extension_doc --- ### Compatibility Matrix This table covers all DuckDB releases that have not reached [end-of-life](https://duckdb.org/release_calendar), including LTS releases, and shows the 2 most recent patch releases of each. Older patch releases are not listed, but the extension may be available for them as well.
| Platform | 1.4.4 | 1.4.5 | 1.5.5 | 1.5.6 | 2.0.0 | | :--- | :---: | :---: | :---: | :---: | :---: | | Linux AMD64 | ✅ | ❌ | ✅ | ✅ | ❌ | | Linux ARM64 | ✅ | ❌ | ✅ | ✅ | ❌ | | macOS AMD64 | ✅ | ❌ | ✅ | ✅ | ❌ | | macOS ARM64 | ✅ | ❌ | ✅ | ✅ | ❌ | | Windows AMD64 | ❌ | ❌ | ✅ | ✅ | ❌ | | Windows ARM64 | ❌ | ❌ | ❌ | ❌ | ❌ | | WebAssembly | ✅ | ❌ | ❌ | ❌ | ❌ | ### Installing and Loading ```sql INSTALL {{ page.extension.name }} FROM community; LOAD {{ page.extension.name }}; ``` {% if page.docs.hello_world %} ### Example ```sql {{ page.docs.hello_world }}``` {% endif %} {% if page.docs.extended_description %} ### About {{ page.extension.name }} {{ page.docs.extended_description }} {% endif %} ### Added Functions | function_name | function_type | description | comment | examples | |-----------------------------|---------------|-------------|---------|----------| | delete_pst_attachments | table | NULL | NULL | | | delete_pst_folders | table | NULL | NULL | | | delete_pst_messages | table | NULL | NULL | | | read_pst_appointments | table | NULL | NULL | | | read_pst_contacts | table | NULL | NULL | | | read_pst_distribution_lists | table | NULL | NULL | | | read_pst_folders | table | NULL | NULL | | | read_pst_messages | table | NULL | NULL | | | read_pst_notes | table | NULL | NULL | | | read_pst_sticky_notes | table | NULL | NULL | | | read_pst_tasks | table | NULL | NULL | | | wipe_pst_free_space | table | NULL | NULL | | ### Overloaded Functions This extension does not add any function overloads. ### Added Types This extension does not add any types. ### Added Settings | name | description | input_type | scope | aliases | |------------------|---------------------------------------------------------------------------------------------------|------------|--------|---------| | pst_allow_delete | Allow delete_pst_* and wipe_pst_free_space to edit PST files in place. Deletion cannot be undone. | BOOLEAN | GLOBAL | [] |