Skip to content

Commit 267102d

Browse files
committed
chore: reorganize readme to not break another section
1 parent 9556f0b commit 267102d

File tree

1 file changed

+25
-40
lines changed

1 file changed

+25
-40
lines changed

README.md

Lines changed: 25 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,31 @@ host=localhost port=5432 dbname=mydb connect_timeout=10
2727
| dbname | Database Name | [user] |
2828
| passfile | Name of file passwords are stored in | ~/.pgpass |
2929

30+
31+
The tables in the file can be read as if they were normal DuckDB tables, but the underlying data is read directly from Postgres at query time.
32+
33+
```sql
34+
D SHOW ALL TABLES;
35+
┌───────────────────────────────────────┐
36+
│ name │
37+
varchar
38+
├───────────────────────────────────────┤
39+
│ uuids │
40+
└───────────────────────────────────────┘
41+
D SELECT * FROM postgres_db.uuids;
42+
┌──────────────────────────────────────┐
43+
│ u │
44+
│ uuid │
45+
├──────────────────────────────────────┤
46+
│ 6d3d2541-710b-4bde-b3af-4711738636bf │
47+
NULL
48+
00000000-0000-0000-0000-000000000001
49+
│ ffffffff-ffff-ffff-ffff-ffffffffffff │
50+
└──────────────────────────────────────┘
51+
```
52+
53+
For more information on how to use the connector, refer to the [Postgres documentation on the website](https://duckdb.org/docs/extensions/postgres).
54+
3055
### AWS RDS IAM Authentication
3156

3257
The extension supports AWS RDS IAM-based authentication, which allows you to connect to RDS PostgreSQL instances using IAM database authentication instead of static passwords. This feature automatically generates temporary authentication tokens using the AWS CLI.
@@ -74,46 +99,6 @@ ATTACH '' AS rds_db (TYPE POSTGRES, SECRET rds_secret);
7499
- **Environment Variables**: The AWS CLI command inherits environment variables from the parent process, so `AWS_PROFILE`, `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, `AWS_SESSION_TOKEN`, and `AWS_REGION` will be available to the AWS CLI.
75100

76101

77-
#### Example with AWS Profile
78-
79-
```sql
80-
81-
CREATE SECRET rds_secret (
82-
TYPE POSTGRES,
83-
HOST 'my-db.xxxxxx.us-east-1.rds.amazonaws.com',
84-
PORT '5432',
85-
USER 'my_iam_user',
86-
DATABASE 'mydb',
87-
USE_RDS_IAM_AUTH true
88-
);
89-
90-
ATTACH '' AS rds_db (TYPE POSTGRES, SECRET rds_secret);
91-
```
92-
93-
The tables in the file can be read as if they were normal DuckDB tables, but the underlying data is read directly from Postgres at query time.
94-
95-
```sql
96-
D SHOW ALL TABLES;
97-
┌───────────────────────────────────────┐
98-
│ name │
99-
varchar
100-
├───────────────────────────────────────┤
101-
│ uuids │
102-
└───────────────────────────────────────┘
103-
D SELECT * FROM postgres_db.uuids;
104-
┌──────────────────────────────────────┐
105-
│ u │
106-
│ uuid │
107-
├──────────────────────────────────────┤
108-
│ 6d3d2541-710b-4bde-b3af-4711738636bf │
109-
NULL
110-
00000000-0000-0000-0000-000000000001
111-
│ ffffffff-ffff-ffff-ffff-ffffffffffff │
112-
└──────────────────────────────────────┘
113-
```
114-
115-
For more information on how to use the connector, refer to the [Postgres documentation on the website](https://duckdb.org/docs/extensions/postgres).
116-
117102
## Building & Loading the Extension
118103

119104
The DuckDB submodule must be initialized prior to building.

0 commit comments

Comments
 (0)