You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Update extension version to 1.3.2 to match DuckDB library version
- Remove duckdb.h and duckdb.hpp (should be downloaded, not committed)
- Update .gitignore to exclude DuckDB binary files and headers
- Add migration script for 1.1.3 to 1.3.2 upgrade
- Update version references in README.md and Makefile
- Keep .duckdb_version file for build configuration
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
Copy file name to clipboardExpand all lines: README.md
+45-22Lines changed: 45 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,19 @@
1
1
# DuckDB Foreign Data Wrapper for PostgreSQL
2
2
3
3
This is a foreign data wrapper (FDW) to connect [PostgreSQL](https://www.postgresql.org/)
4
-
to [DuckDB](https://duckdb.org/) database file. This FDW works with PostgreSQL 9.6 ... 16 and works with exact same version of `libduckdb`.
4
+
to [DuckDB](https://duckdb.org/) database files through DuckDB's SQLite compatibility layer. This FDW works with PostgreSQL 9.6 ... 17 and uses DuckDB's built-in SQLite API compatibility.
**Important Technical Note**: This FDW uses DuckDB's SQLite compatibility layer rather than direct DuckDB API calls. The implementation leverages DuckDB's ability to act as a drop-in replacement for SQLite, providing:
11
+
12
+
- SQLite API compatibility (`sqlite3.h`)
13
+
- DuckDB's advanced query optimization and performance
14
+
- Support for DuckDB's rich data types and functions
15
+
- Direct file-based database access
16
+
8
17
## Contents
9
18
10
19
1.[Features](#features)
@@ -36,15 +45,18 @@ to [DuckDB](https://duckdb.org/) database file. This FDW works with PostgreSQL 9
36
45
37
46
### Pushdowning
38
47
39
-
-*not described*
48
+
- WHERE clauses with operators, functions and operators
49
+
- Aggregate functions (COUNT, SUM, AVG, MIN, MAX)
50
+
- GROUP BY clauses
51
+
- ORDER BY clauses
52
+
- JOIN operations (inner, left, right, full)
53
+
- LIMIT/OFFSET clauses
40
54
41
55
### Notes about pushdowning
42
56
43
-
-*not described*
44
-
45
-
### Notes about features
46
-
47
-
Also see [Limitations](#limitations)
57
+
- Pushdown is controlled by DuckDB's query optimizer through the SQLite compatibility layer
58
+
- Complex queries may be partially pushed down depending on DuckDB's capabilities
59
+
- Some PostgreSQL-specific functions may not push down and will be executed locally
48
60
49
61
## Supported platforms
50
62
@@ -56,14 +68,14 @@ Also see [Limitations](#limitations)
56
68
57
69
There's a `duckdb_fdw` rpm available on Pigsty's PGSQL [yum repository](https://repo.pigsty.cc/repo) for el8 and el9
#### 2. Download DuckDB library using automated script
76
88
77
-
For example, we want to compile under Linux AMD64 with DuckDB v1.0.0, just download [libduckdb-linux-amd64.zip](https://github.com/duckdb/duckdb/releases/download/v1.0.0/libduckdb-linux-amd64.zip)
89
+
The project includes an automated download script that fetches the latest DuckDB version:
Beware that this libduckdb.so is build on ubuntu with higher glibc version, to use `duckdb_fdw` on el8 / el9, you have to compile `[libduckdb-src.zip`](https://github.com/duckdb/duckdb/releases/download/v1.0.0/libduckdb-src.zip) from source
103
+
**Note**: The download script automatically:
104
+
- Detects your platform (Linux/macOS) and architecture
105
+
- Downloads the appropriate DuckDB library
106
+
- Creates a `.duckdb_version` file for build configuration
107
+
- Renames the library with version suffix for compatibility
108
+
109
+
For Enterprise Linux (RHEL/CentOS 8/9), you may need to compile from source using `libduckdb-src.zip` due to glibc version compatibility.
88
110
89
111
#### 3. Build and install duckdb_fdw
90
112
91
113
Add a directory of `pg_config` to PATH and build and install `duckdb_fdw`.
92
114
93
115
```sh
116
+
# The .duckdb_version file is automatically created by the download script
0 commit comments