Skip to content

Commit 8da17b7

Browse files
committed
Update Readme to add user mapping details
1 parent f8fc1fe commit 8da17b7

1 file changed

Lines changed: 20 additions & 11 deletions

File tree

README.md

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ CREATE foreign data wrapper etcd_fdw handler etcd_fdw_handler validator etcd_fdw
5151
CREATE SERVER my_etcd_server foreign data wrapper etcd_fdw options (connstr '127.0.0.1:2379');
5252
```
5353

54+
```sql
55+
CREATE USER MAPPING FOR CURRENT_USER SERVER my_etcd_server OPTIONS (user 'root', password 'secret');
56+
```
57+
5458
```sql
5559
CREATE foreign table test (key text, value text) server my_etcd_server options(rowid_column 'key');
5660
```
@@ -86,7 +90,7 @@ foreign server itself.
8690
`etcd_fdw` now also supports limit offset push-down. Wherever possible,
8791
perform LIMIT operations on the remote server.
8892

89-
#### WHERE push-down
93+
### WHERE push-down
9094

9195
`etcd_fdw` now supports WHERE clause push-down for simple key-based comparisons. Whenever possible, equality and range conditions are translated into etcd key scans, so filtering is done on the remote server.
9296
Currently supported operators: `=`, `>=`, `>`, `<=`, `<`, `BETWEEN`, and `LIKE 'prefix%'`.
@@ -98,7 +102,7 @@ This behavior is consistent with the prefix, range_end, and key options in `CREA
98102

99103
`etcd_fdw` accepts the following options via the `CREATE SERVER` command:
100104

101-
- **connstr** as *string*, requuired
105+
- **connstr** as *string*, required
102106

103107
Connetion string for etcd server i.e. `127.0.0.1:2379`
104108

@@ -121,14 +125,6 @@ This behavior is consistent with the prefix, range_end, and key options in `CREA
121125
The domain name to use for verifying the server’s TLS certificate during the handshake.
122126
This value must match the Common Name (CN) or one of the Subject Alternative Names (SANs) in the server’s certificate.
123127

124-
- **username** as *string*, optional, no default
125-
126-
Username to use when connecting to etcd.
127-
128-
- **password** as *string*, optional, no default
129-
130-
Password to authenticate to the etcd server with.
131-
132128
- **connect_timeout** as *string*, optional, default = `10`
133129

134130
Timeout in seconds for establishing the initial connection to the etcd server.
@@ -142,7 +138,7 @@ This behavior is consistent with the prefix, range_end, and key options in `CREA
142138
`etcd_fdw` accepts the following table-level options via the
143139
`CREATE FOREIGN TABLE` command.
144140

145-
- **rowid_column** as *string*, mandatory, no default
141+
- **rowid_column** as *string*, required, no default
146142

147143
Specifies which column should be treated as the unique row identifier.
148144
Usually set to key.
@@ -186,6 +182,19 @@ This behavior is consistent with the prefix, range_end, and key options in `CREA
186182
Serializable(`s`), Allows serving results from a local etcd member without cluster-wide consensus.
187183
Serializable reads are faster and lighter on the cluster, but may return stale data in some cases
188184

185+
### CREATE USER MAPPING options
186+
187+
`etcd_fdw` accepts the following user mapping options via the
188+
`CREATE USER MAPPING` command.
189+
190+
- **user** as *string*, required, no default
191+
192+
Username to use when connecting to etcd.
193+
194+
- **password** as *string*, required, no default
195+
196+
Password to authenticate to the etcd server with.
197+
189198
## What doesn't work
190199

191200
etcd_fdw supports almost all kinds of CRUD operations. What doesn't work is modifying the key (which is the rowid value) directly using `UPDATE` statements.

0 commit comments

Comments
 (0)