Search code examples
postgresqlindexinggwt-gintrigram

postgresql : read GIN index content


I would like to read the trigram list supposedly created with my GIN index but I can't seem to find the command anywhere: I tried \di+, \dv+, \dm+ or each without the +. Nothing returns.

Do I misunderstand something or my index is empty? It shows a 16ko size but it could be the empty standard size as far as I know.


Solution

  • It's not possible to see the data stored inside an index using plain SQL (and the psql backslash commands are simply translated to SQL).

    If you want to inspect the internal of the blocks of an index, you need to install the extension pageinspect which also has some functions specifically for GIN indexes