back to listing index

postgresql - Create index if it does not exist - Database Administrators Stack Exchange

[web search]
Original source (dba.stackexchange.com)
Tags: postgres postgresql index-creation indexing create-index-if-not-exists
Clipped on: 2014-04-09

I am working on a function that allows me to add an index if it does not exist. I am running into the problem that I cannot get a list of indexes to compare to. Any thoughts?

This is a similar issue to the column creation one that is solved with this code:

http://stackoverflow.com/a/12603892/368511