当我将数据库从heroku拉到localhost时,我收到此消息:
▸ WARNING: Extensions in newly created target database differ from existing source database.
▸ Target extensions:
▸
▸ Source extensions:
▸ extname
▸ ----------
▸ plpgsql
▸ unaccent
▸ (2 rows)
在localhost上我得到了这个:
select * from pg_available_extensions;
name | default_version | installed_version | comment
--------------------+-----------------+-------------------+----------------------------------------------------------------------
unaccent | 1.1 | | text search dictionary that removes accents
(52 rows) #cut for brievity
但是:
select * from pg_extension;
extname | extowner | extnamespace | extrelocatable | extversion | extconfig | extcondition
---------+----------+--------------+----------------+------------+-----------+--------------
plpgsql | 10 | 11 | f | 1.0 | |
(1 row)
在heroku上:
DATABASE=> select * from pg_extension;
extname | extowner | extnamespace | extrelocatable | extversion | extconfig | extcondition
----------+----------+--------------+----------------+------------+-----------+--------------
plpgsql | 10 | 11 | f | 1.0 | |
unaccent | 10 | 5147991 | t | 1.1 | |
(2 rows)
所以我想问题是如何在本地激活unaccent
。另一个问题是:为什么我会在plpgsql
上收到此消息?