Hi, Today, I found myself wondering whether we could add a non-btree index, and in particular a GIN index, to a system catalog if we so desired. Currently, after initdb, we only create tables and btree indexes, but I'm not sure if there is any good reason why we couldn't do something else. One problem with a GIN index specifically is that it doesn't implement amgettuple, so routines like systable_getnext() and index_getnext() couldn't be used, and we'd have to code up a bitmap scan. Currently, bitmap scans aren't used anywhere other than the executor, but I don't know of any reason why it wouldn't be practical to use them elsewhere.
I think I may pursue a different approach to the problem that led me to think about this, at least for the moment. But I'm still curious about the general question: if somebody showed up with a well-written patch that added a GIN index to a system catalog, would that potentially be acceptable, or DOA? -- Robert Haas EDB: http://www.enterprisedb.com