From a6aea4e80dc4e441ac77e2c1647197656eefa53b Mon Sep 17 00:00:00 2001 From: Gabor Szarnyas Date: Mon, 1 Jul 2024 09:51:04 +0200 Subject: [PATCH] Postgres scanner: Document pg_use_ctid_scan Fixes #3208 --- docs/extensions/postgres.md | 65 +++++++++++++++++++------------------ 1 file changed, 33 insertions(+), 32 deletions(-) diff --git a/docs/extensions/postgres.md b/docs/extensions/postgres.md index 5701147db21..e80f3664719 100644 --- a/docs/extensions/postgres.md +++ b/docs/extensions/postgres.md @@ -47,15 +47,15 @@ dbname=postgresscanner host=localhost port=5432 dbname=mydb connect_timeout=10 ``` -| Name | Description | Default | -|------------|--------------------------------------|------------------| -| `dbname` | Database name | [user] | -| `host` | Name of host to connect to | `localhost` | -| `hostaddr` | Host IP address | `localhost` | -| `passfile` | Name of file passwords are stored in | `~/.pgpass` | -| `password` | Postgres password | (empty) | -| `port` | Port number | `5432` | -| `user` | Postgres user name | current user | +| Name | Description | Default | +| ---------- | ------------------------------------ | ------------ | +| `dbname` | Database name | [user] | +| `host` | Name of host to connect to | `localhost` | +| `hostaddr` | Host IP address | `localhost` | +| `passfile` | Name of file passwords are stored in | `~/.pgpass` | +| `password` | Postgres password | (empty) | +| `port` | Port number | `5432` | +| `user` | Postgres user name | current user | An example URI is `postgresql://username@hostname/dbname`. @@ -89,7 +89,7 @@ SHOW ALL TABLES;
| name | -|-------| +| ----- | | uuids | ```sql @@ -98,8 +98,8 @@ SELECT * FROM uuids;
-| u | -|--------------------------------------| +| u | +| ------------------------------------ | | 6d3d2541-710b-4bde-b3af-4711738636bf | | NULL | | 00000000-0000-0000-0000-000000000001 | @@ -154,9 +154,9 @@ INSERT INTO postgres_db.tbl VALUES (42, 'DuckDB'); SELECT * FROM postgres_db.tbl; ``` -| id | name | -|---:|--------| -| 42 | DuckDB | +| id | name | +| ---: | ------ | +| 42 | DuckDB | ### `COPY` @@ -237,9 +237,9 @@ INSERT INTO postgres_db.s1.integers VALUES (42); SELECT * FROM postgres_db.s1.integers; ``` -| i | -|---:| -| 42 | +| i | +| ---: | +| 42 | ```sql DROP SCHEMA postgres_db.s1; @@ -262,9 +262,9 @@ SELECT * FROM postgres_db.tmp; This returns: -| i | -|---:| -| 42 | +| i | +| ---: | +| 42 | ```sql ROLLBACK; @@ -299,8 +299,8 @@ SELECT * FROM postgres_query('postgres_db', 'SELECT * FROM cars LIMIT 3'); ; --> -| brand | model | color | -|--------------|------------|-------| +| brand | model | color | +| ------------ | ---------- | ----- | | Ferrari | Testarossa | red | | Aston Martin | DB2 | blue | | Bentley | Mulsanne | gray | @@ -321,15 +321,16 @@ CALL postgres_execute('postgres_db', 'CREATE TABLE my_table (i INTEGER)'); The extension exposes the following configuration parameters. -| Name | Description | Default | -|-----------------------------------|----------------------------------------------------------------------------|-----------| -| `pg_debug_show_queries` | DEBUG SETTING: print all queries sent to Postgres to stdout | `false` | -| `pg_connection_cache` | Whether or not to use the connection cache | `true` | -| `pg_experimental_filter_pushdown` | Whether or not to use filter pushdown (currently experimental) | `false` | -| `pg_array_as_varchar` | Read Postgres arrays as varchar - enables reading mixed dimensional arrays | `false` | -| `pg_connection_limit` | The maximum amount of concurrent Postgres connections | `64` | -| `pg_pages_per_task` | The amount of pages per task | `1000` | -| `pg_use_binary_copy` | Whether or not to use BINARY copy to read data | `true` | +| Name | Description | Default | +| --------------------------------- | -------------------------------------------------------------------------- | ------- | +| `pg_array_as_varchar` | Read Postgres arrays as varchar - enables reading mixed dimensional arrays | `false` | +| `pg_connection_cache` | Whether or not to use the connection cache | `true` | +| `pg_connection_limit` | The maximum amount of concurrent Postgres connections | `64` | +| `pg_debug_show_queries` | DEBUG SETTING: print all queries sent to Postgres to stdout | `false` | +| `pg_experimental_filter_pushdown` | Whether or not to use filter pushdown (currently experimental) | `false` | +| `pg_pages_per_task` | The amount of pages per task | `1000` | +| `pg_use_binary_copy` | Whether or not to use BINARY copy to read data | `true` | +| `pg_use_ctid_scan` | Whether or not to parallelize scanning using table ctids | `true` | ## Schema Cache