Is index on column updated if the column is updated but data does not change?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rverghese
    New Member
    • Sep 2008
    • 1

    Is index on column updated if the column is updated but data does not change?

    I have a BEFORE UPDATE trigger on a table that calls the tsvector_update _trigger() built in function to update a tsvector field.
    Since this trigger is called for every update to the table, the trigger function will be called even when the tsvector related field is not updated.
    My question is, does the index on that tsvector column get updated each time, even though the column is being updated with the same value? If it is I could replace the build in tsvector_update _trigger() function with my own trigger function that does a check before, if not I could just keep things the way they are.
    Thanks
    riya
  • rski
    Recognized Expert Contributor
    • Dec 2006
    • 700

    #2
    I do some tests and it looks that index is always updated.

    Comment

    Working...