Timeline for Postgres: INSERT if does not exist already
Current License: CC BY-SA 3.0
4 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
May 16, 2019 at 4:22 | comment | added | Sukma Saputra | I love this answer, use function and trigger. Now I find another way to break the deadlock using functions and triggers... | |
Feb 3, 2016 at 10:03 | comment | added | Jacek Krawczyk | Exactly this answer I was looking for. Clean code, using function + trigger instead of select statement. +1 | |
Feb 24, 2013 at 4:45 | comment | added | Pete | If anyone else was wondering too, from the docs: "Row-level triggers fired BEFORE can return null to signal the trigger manager to skip the rest of the operation for this row (i.e., subsequent triggers are not fired, and the INSERT/UPDATE/DELETE does not occur for this row). If a nonnull value is returned then the operation proceeds with that row value." | |
May 21, 2012 at 15:32 | history | answered | ktr | CC BY-SA 3.0 |