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
Copy file name to clipboardExpand all lines: README.md
+52-1Lines changed: 52 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ CREATE SERVER my_etcd_server foreign data wrapper etcd_fdw options (connstr '127
29
29
```
30
30
31
31
```sql
32
-
CREATE foreign table test (key text, value text) server my_etcd_server options(rowid'key');
32
+
CREATE foreign table test (key text, value text) server my_etcd_server options(rowid_column'key');
33
33
```
34
34
35
35
```sql
@@ -93,6 +93,57 @@ Usage
93
93
94
94
Timeout in seconds to each request after the connection has been established.
95
95
96
+
97
+
## CREATE FOREIGN TABLE options
98
+
99
+
`etcd_fdw` accepts the following table-level options via the
100
+
`CREATE FOREIGN TABLE` command.
101
+
102
+
-**rowid_column** as *string*, mandatory, no default
103
+
104
+
Specifies which column should be treated as the unique row identifier.
105
+
Usually set to key.
106
+
107
+
-**prefix** as *string*, optional, no default
108
+
109
+
Restrict the scan to keys beginning with this prefix.
110
+
If not provided, the FDW will fetch all keys from the etcd server
111
+
112
+
-**keys_only** as *string*, optional, default `false`
113
+
114
+
If set to true, only the keys are fetched, not the values.
115
+
Useful to reduce network overhead when values are not needed.
116
+
117
+
-**revision** as *string*, optional, default `0`
118
+
119
+
Read key-value data at a specific etcd revision.
120
+
If 0, the latest revision is used.
121
+
122
+
-**key** as *string*, optional, no default
123
+
124
+
The starting key to fetch from etcd.
125
+
126
+
This option defines the beginning of the range.
127
+
If neither `prefix` nor `key` is specified, the FDW will default to `\0` (the lowest possible key).
128
+
129
+
-**range_end** as *string*, optional, no default
130
+
131
+
The exclusive end of the key range. Restricts the scan to the half-open interval `[key, range_end)`.
132
+
133
+
All keys between key (inclusive) and range_end (exclusive) will be returned.
134
+
If range_end is omitted, only the single key defined by key will be returned (unless prefix is used).
135
+
136
+
-**consistency** as *string*, optional, default `l`
137
+
138
+
Specifies the read consistency level for etcd queries.
139
+
140
+
141
+
Linearizable(`l`), Ensures the result reflects the latest consensus state of the cluster.
142
+
Linearizable reads have higher latency but guarantee fresh data.
143
+
144
+
Serializable(`s`), Allows serving results from a local etcd member without cluster-wide consensus.
145
+
Serializable reads are faster and lighter on the cluster, but may return stale data in some cases
146
+
96
147
## What doesn't work
97
148
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