S
S
shdprogrammer2016-02-21 14:23:12
PostgreSQL
shdprogrammer, 2016-02-21 14:23:12

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

1 answer(s)
S
shdprogrammer, 2016-02-21
@shdprogrammer

Thanks everyone, I thought of moving the first join to from... )

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question