Azure-Samples / Azure-Samples/azure-python-labs

[01-postgres] Add instructions to allow-list the postgis extension

Open
#81 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
175
Forks
107
PR merge metrics
No merged PRs in 30d

Description

Error via Microsoft Open Source Discord:

```
File ".\azure-python-labs\01-postgres\pg-lab.py", line 30, in loadData
cursor.execute('CREATE EXTENSION IF NOT EXISTS postgis')psycopg2.errors.FeatureNotSupported: extension "postgis" is not allow-listed for "azure_pg_admin" users in Azure Database for PostgreSQL
HINT: to see the full allow list of extensions, please run: "show azure.extensions;"
```

The extension will need to be allow-listed per https://docs.microsoft.com/en-us/azure/postgresql/flexible-server/concepts-extensions#how-to-use-postgresql-extensions

Contributor guide

Open the contributing guide

Research direction

Start with 01-postgres/pg-lab.py, especially the loadData entry point around line 30, and read the linked Azure Database for PostgreSQL extension instructions. Add the allow-listing steps for postgis before the CREATE EXTENSION command. Done means the lab instructions explain how to avoid the azure_pg_admin error.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, postgresql, python
Domain
cloud, databases, documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.