I want to write a SpringBatch Tasklet, that automatically activates or de-activates all indexes for a given database table. The code needs to work independantly of the DBMS
I had a similar problem and the cause in my case was, the case-sensitivity. I had to write the whole tablename in lower case letters (like it appeared in the result set of the SQL "SELECT tablename,indexname,indexdef FROM pg_indexes".
I also changed the second last parameter ("unique" parameter) to false to get all indexes (otherwise I just got the primary key).
Hope this helps.