Timeline for Limiting the number of rows that can be inserted for a given WHERE clause
Current License: CC BY-SA 4.0
4 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 16 at 15:46 | comment | added | Charlieface | Like this dbfiddle.uk/FSuxW1wX note the lack of a join as the CTE is updated directly | |
Apr 16 at 14:58 | comment | added | Laurenz Albe | @Charlieface I don't know what exactly that is, but you can use a trigger in PostgreSQL (which would be my preferred option). | |
Apr 16 at 11:10 | comment | added | Charlieface |
Shame Postgres doesn't support updating through a derived table or subquery, like in SQL Server. Then you could just do WITH my_slot ... UPDATE my_slot ...
|
|
Apr 16 at 1:58 | history | answered | Erwin Brandstetter | CC BY-SA 4.0 |