yugabyte / yugabyte-db

YugabyteDB - the cloud native distributed SQL database for mission-critical applications.
https://www.yugabyte.com
Other
8.73k stars 1.05k forks source link

[YSQL][PostGIS] CREATE EXTENSION postgis fails on macOS #11289

Open def- opened 2 years ago

def- commented 2 years ago

Jira Link: DB-1061

Description

yugabyte=# CREATE EXTENSION postgis;
ERROR:  syntax error at or near "SUPPORT"

Following https://docs.yugabyte.com/latest/api/ysql/extensions/#postgis . This might happen because the homebrew postgres installation instructions install a very new Postgres version:

$ pg_config --version
PostgreSQL 14.1
polarweasel commented 2 years ago

I've tried installing PG 11 with brew install postgresql@11, then brew install postgis, and then following the remainder of the instructions in the docs, and it still fails with the same "SUPPORT" syntax error Denis reported.

This'll need a docs update for sure, but I'm wondering if that's all it'll need. @sushantrmishra any progress here?

ddhodge commented 2 years ago

Grabbed files from v11 from the postgres.app. Had to copy a bunch of .dylib files - which is not in the instructions, but there appear to be library dependencies. Managed to create the extension. But when I run a command I get

yugabyte=# SELECT a.neighbourh, b.neighbourh FROM "geo_export" AS a, "geo_export" AS b
WHERE ST_Intersects(a.geom, b.geom) AND a.neighbourh LIKE 'University of Alberta';
server closed the connection unexpectedly
    This probably means the server terminated abnormally
    before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.
!>