reindex-textual-data: Reindex textual functional indexes too.

This catches nine functional indexes that the previous query didn’t:

upper_preregistration_email_idx
upper_stream_name_idx
upper_subject_idx
upper_userprofile_email_idx
zerver_message_recipient_upper_subject
zerver_mutedtopic_stream_topic
zerver_stream_realm_id_name_uniq
zerver_userprofile_realm_id_delivery_email_uniq
zerver_userprofile_realm_id_email_uniq

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2022-01-06 17:18:12 -08:00 committed by Alex Vandiver
parent 1b303e7b2f
commit 1cc1de82cd
1 changed files with 1 additions and 3 deletions

View File

@ -65,9 +65,7 @@ FROM
JOIN pg_class AS trel ON trel.oid = i.indrelid JOIN pg_class AS trel ON trel.oid = i.indrelid
JOIN pg_namespace AS tnsp ON trel.relnamespace = tnsp.oid JOIN pg_namespace AS tnsp ON trel.relnamespace = tnsp.oid
JOIN pg_class AS irel ON irel.oid = i.indexrelid JOIN pg_class AS irel ON irel.oid = i.indexrelid
CROSS JOIN unnest(i.indkey) colnum JOIN pg_attribute AS a ON a.attrelid = i.indexrelid
JOIN pg_attribute AS a ON trel.oid = a.attrelid
AND a.attnum = colnum
WHERE tnsp.nspname = 'zulip' WHERE tnsp.nspname = 'zulip'
AND a.attcollation != 0 AND a.attcollation != 0
GROUP BY 1, 2, i.indrelid GROUP BY 1, 2, i.indrelid