haskell-beam / haskell-beam/beam
beam-postgres: Not possible to UPDATE .. FROM .. RETURNING
Open
enhancement
- Dominant language
- Haskell
- Stars
- 635
- Forks
- 193
- PR merge metrics
- No merged PRs in 30d
Description
I need to run a query [like the following](https://stackoverflow.com/a/7927957):
```sql
UPDATE tbl x
SET tbl_id = 24
, name = 'New Gal'
FROM (SELECT tbl_id, name FROM tbl WHERE tbl_id = 4 FOR UPDATE) y
WHERE x.tbl_id = y.tbl_id
RETURNING y.tbl_id AS old_id, y.name AS old_name, x.tbl_id, x.name;
```
but afaik this isn't possible in `beam` at the moment.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.