I created a transfer sequence that I want to use for both creating and updating. I think I can create a filter before saving, which will adjust the sequence, but I'm not sure how to "enter" the required SQL (in this case nextval('sequence')). My query should look something like this:
UPDATE users
SET
sequence=nextval('users_sequence'),
name='Kevin',
...
WHERE id=...
Please note that I, unfortunately, cannot create a trigger for this, since I am deploying on a shared Heroku database and do not have access to PLPGSQL.
source
share