PostGIS - Aurora database Raster GIST index support

0

Hello,

I have created a PostgreSQL database, including the PostGIS extension, however, I'm unable to create GiST index on my rast column.

I'm trying to execute the following line:

CREATE INDEX IF NOT EXISTS rast_index ON public.raster_data USING gist(rast);

I get the following response:

ERROR:  data type raster has no default operator class for access method "gist"
HINT:  You must specify an operator class for the index or define a default operator class for the data type.
SQL state: 42704
질문됨 2년 전384회 조회
1개 답변
0

Hi,

I understand you are not able to create GiST index on my rast column using the below command CREATE INDEX IF NOT EXISTS rast_index ON public.raster_data USING gist(rast); Kindly note that GiST indexes enable building general B-Tree structures that you can use for operations more complex than equality and range comparisons. They are mainly used to create indexes for geometric data types and they support full-text search indexing. With that said above you can only create GIST indexes for geometric data types such as ( point , polygon , lseg , box , circle , and path) for PostgreSQL.

See the example below:

postgres=> CREATE TABLE my_points (

id serial PRIMARY KEY,

p geometry(POINT),

pz geometry(POINTZ),

pm geometry(POINTM),

pzm geometry(POINTZM),

p_srid geometry(POINT,4269) ); CREATE TABLE postgres=> CREATE INDEX IF NOT EXISTS rast_index ON public.my_points USING gist(p);

CREATE INDEX

For more information about GIST, kindly visit the below link:

[+]https://docs.aws.amazon.com/dms/latest/oracle-to-aurora-postgresql-migration-playbook/chap-oracle-aurora-pg.tables.indexes.html#chap-oracle-aurora-pg.tables.indexes.pg [+]https://www.postgresql.org/docs/9.0/textsearch-indexes.html

Winnie
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인