Skip to content

Commit 62cd318

Browse files
authored
chore: bump supabase-wrappers to v0.5.7 (#27)
1 parent b6b7084 commit 62cd318

2 files changed

Lines changed: 23 additions & 15 deletions

File tree

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ pg_test = []
2424
etcd-client = { version = "0.16", features = ["tls"] }
2525
futures = "0.3.31"
2626
pgrx = {version="=0.16.1"}
27-
supabase-wrappers = { git="https://github.com/supabase/wrappers.git", branch="main", default-features = false }
27+
supabase-wrappers = { git="https://github.com/supabase/wrappers.git", tag="v0.5.7", default-features = false }
2828
thiserror = "2.0.16"
2929
tokio = { version = "1.47.1", features = ["full"] }
3030
testcontainers = { version = "0.25.0", features = ["blocking"] }

README.md

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
# etcd_fdw
2+
23
A foreign data wrapper around etcd for postgres
34

45
## Setup
6+
57
- Install pgrx on your machine `cargo install --locked cargo-pgrx --version 0.16.1`
68
- Setup pgrx `cargo pgrx init`
79
- Install protoc and protobuf (needed by etcd-client)
8-
- Instructions can be found [here](https://protobuf.dev/installation/)
10+
- Instructions can be found [on the official site](https://protobuf.dev/installation/)
911
- Have some kind of etcd you want to test and run
1012

11-
1213
## Build
14+
1315
- To build simply run `cargo pgrx run` with or without the `--release` flag
1416

1517
## Try out something yourself
18+
1619
Currently we can only read from etcd.
1720
Here's an example of how to connect to your etcd instance and read some KVs
1821

@@ -37,36 +40,41 @@ SELECT * FROM test;
3740
```
3841

3942
Which would yield something like:
43+
4044
```
4145
key | value
4246
-----+-------
4347
bar | baz
4448
foo | bar
4549
(2 rows)
4650
```
47-
the rowid option is required. As are the names key and value for the columns.
4851

52+
the rowid option is required. As are the names key and value for the columns.
4953

5054
## Pushdowning
5155

52-
#### ORDER BY push-down
56+
`etcd_fdw` supports push-down of filters, order by and limit clauses to the etcd server.
57+
58+
### ORDER BY push-down
59+
5360
`etcd_fdw` now also supports order by push-down. If possible, push order by
5461
clause to the remote server so that we get the ordered result set from the
5562
foreign server itself.
5663

57-
#### LIMIT push-down
64+
### LIMIT push-down
65+
5866
`etcd_fdw` now also supports limit offset push-down. Wherever possible,
59-
perform LIMIT operations on the remote server.
67+
perform LIMIT operations on the remote server.
6068

6169
#### WHERE push-down
70+
6271
`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.
6372
Currently supported operators: `=`, `>=`, `>`, `<=`, `<`, `BETWEEN`, and `LIKE 'prefix%'`.
6473
This behavior is consistent with the prefix, range_end, and key options in `CREATE FOREIGN TABLE`.
6574

66-
Usage
67-
-----
75+
## Usage
6876

69-
## CREATE SERVER options
77+
### CREATE SERVER options
7078

7179
`etcd_fdw` accepts the following options via the `CREATE SERVER` command:
7280

@@ -109,8 +117,7 @@ Usage
109117

110118
Timeout in seconds to each request after the connection has been established.
111119

112-
113-
## CREATE FOREIGN TABLE options
120+
### CREATE FOREIGN TABLE options
114121

115122
`etcd_fdw` accepts the following table-level options via the
116123
`CREATE FOREIGN TABLE` command.
@@ -139,7 +146,7 @@ Usage
139146

140147
The starting key to fetch from etcd.
141148

142-
This option defines the beginning of the range.
149+
This option defines the beginning of the range.
143150
If neither `prefix` nor `key` is specified, the FDW will default to `\0` (the lowest possible key).
144151

145152
- **range_end** as *string*, optional, no default
@@ -153,16 +160,17 @@ Usage
153160

154161
Specifies the read consistency level for etcd queries.
155162

156-
157163
Linearizable(`l`), Ensures the result reflects the latest consensus state of the cluster.
158164
Linearizable reads have higher latency but guarantee fresh data.
159165

160-
Serializable(`s`), Allows serving results from a local etcd member without cluster-wide consensus.
166+
Serializable(`s`), Allows serving results from a local etcd member without cluster-wide consensus.
161167
Serializable reads are faster and lighter on the cluster, but may return stale data in some cases
162168

163169
## What doesn't work
170+
164171
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.
165172
What does work is the following workflow:
173+
166174
```
167175
etcd_fdw=# SELECT * FROM test;
168176
key | value

0 commit comments

Comments
 (0)