且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

CREATE EXTENSION postgis之后不存在类型几何体

更新时间:2023-10-10 23:33:10

CREATE EXTENSION永久.它将在给定(或当前默认值)中创建对象模式. 每个文档:

CREATE EXTENSION is permanent for the database you are running it in. It creates objects in a given (or the current default) schema. Per documentation:

模式名称

schema_name

假设扩展允许其内容重定位,则在其中安装扩展对象的模式的名称. 命名架构必须已经存在.如果未指定,则 扩展的控制文件也未指定架构,当前 使用默认的对象创建模式.

The name of the schema in which to install the extension's objects, given that the extension allows its contents to be relocated. The named schema must already exist. If not specified, and the extension's control file does not specify a schema either, the current default object creation schema is used.

请记住,扩展本身不被视为在任何模式中:扩展具有必须唯一的不合格名称. 数据库范围内.但是属于扩展名的对象可以在 模式.

Remember that the extension itself is not considered to be within any schema: extensions have unqualified names that must be unique database-wide. But objects belonging to the extension can be within schemas.

检查psql中涉及哪些架构:

\connect mydb
\x 
\dx postgis*

使用的架构必须位于您当前的

The schemas used must be in your current search_path (or you'd have to schema-qualify all references).
I am not sure migrate includes additional schemas or extensions at all. Most probably, this is an issue with the search_path