Show materialized view definition in #postgresql
PSQL offers a handy
\dv function for showing the definition of a view. That function does not seem to work on materialized views.
To see the definition of a materialized view use the following instead:
Another option is to use
\d+ search_documents which shows both the query and the columns.
search_documents with the name of your view.)