Skip to content

Commit ff7435c

Browse files
committed
docs: Add documentation detailing how to update the key column without directly using UPDATE, because updating the rowid column doesn't work with supabase-wrappers
1 parent 2aa1232 commit ff7435c

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

README.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,4 +91,25 @@ Usage
9191

9292
- **request_timeout** as *string*, optional, default = `30`
9393

94-
Timeout in seconds to each request after the connection has been established.
94+
Timeout in seconds to each request after the connection has been established.
95+
96+
## What doesn't work
97+
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.
98+
What does work is the following workflow:
99+
```
100+
etcd_fdw=# SELECT * FROM test;
101+
key | value
102+
-------+-------
103+
bar | baz
104+
foo | abc
105+
(2 rows)
106+
etcd_fdw=# INSERT INTO TEST (key,value) SELECT key || '_new', value FROM test;
107+
INSERT 0 2
108+
etcd_fdw=# DELETE FROM test WHERE NOT key LIKE '%_new';
109+
DELETE 2
110+
etcd_fdw=# SELECT * FROM test;
111+
key | value
112+
-----------+-------
113+
bar_new | baz
114+
foo_new | abc
115+
```

0 commit comments

Comments
 (0)