NEW VALUES IN POSTRGESQL?
For example, I have a post table:
id uuid
creator_id uuid
categories text[]
description text
created_at timestamp without time zone
And I created a post so values like below:
-[ RECORD 1 ]----+-------------------------------------------
id | f1e2854a-dbdd-42b4-bc00-f1b79a823624
creator_id | 5a5499ce-b462-44e6-ab90-b57242879504
categories | {sightseeing, sport, travel, photography}
description | This post about beatiful mountain
created_at | 2022-01-13 10:11:03.346752
Then I updated(edited) my post so values like belov:
-[ RECORD 1 ]----+-------------------------------------------
id | f1e2854a-dbdd-42b4-bc00-f1b79a823624
creator_id | 5a5499ce-b462-44e6-ab90-b57242879504
categories | {travel, photography, hobby, climbing}
description | This post about beatiful mountain
created_at | 2022-01-13 10:11:03.346752
So categories were edited and added. Question: How can I compare old and new values of categories in Postgresql?
Guys, can someone assist me, please?
Обсуждают сегодня