-- 修改用户的密码
alter user postgres with password 'PostgreSQL20868354';
-- 查询所有用户
select * from pg_catalog.pg_user;

-- 查询表的 COLLATION VERSION
SELECT
    datname,
    datcollversion,
    pg_collation_actual_version((SELECT oid FROM pg_collation WHERE collname = 'default')) as system_version
FROM pg_database
WHERE datname IN ('fortern', 'postgres', 'kt_shop')
ORDER BY datname;

-- 重建索引
REINDEX DATABASE postgres;
ALTER DATABASE postgres REFRESH COLLATION VERSION;

REINDEX DATABASE fortern;
ALTER DATABASE fortern REFRESH COLLATION VERSION;

REINDEX DATABASE kt_shop;
ALTER DATABASE kt_shop REFRESH COLLATION VERSION;
