Stefan Skorpen @skorpen.com · Nov 10

Triggers in PostgreSQL are really fun! I needed to set a column value to the id of the row if its made by a free user. Or set it to a user generated slug if its made by a paid user. You can get the id with a trigger that runs BEFORE the insert in the table like this:

0 likes 0 replies

?