Answer the question
In order to leave comments, you need to log in
NEW and JOIN in BEFORE INSERT postgresql trigger?
Good day. I have a table which is a tree. That is, almost every record, except for the top ones, has a parent_id. There are also slug and uri fields. The uri is made up of the slug of the entry itself and the parent slug.
Actually I'm doing a trigger on BEFORE INSERT, to fill in the uri fields. I don’t understand how to make a join in it if the id doesn’t exist yet.
Thanks
Answer the question
In order to leave comments, you need to log in
Thanks everyone, I thought of moving the first join to from... )
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question