Toolverse
All skills

postgis-skill

by postgis

PostGIS-focused SQL tips, tricks and gotchas. Use when in need of dealing with geospatial data in Postgres.

Installation

Pick a client and clone the repository into its skills directory.

Installation

Quick info

Author
postgis
Category
Backend
Views
20

About this skill

PostGIS-focused SQL tips, tricks and gotchas. Use when in need of dealing with geospatial data in Postgres.

How to use

  1. Zainstaluj PostGIS jako rozszerzenie PostgreSQL — uruchom CREATE EXTENSION postgis; w bazie danych, którą chcesz używać do pracy z danymi geoprzestrzennymi.

  2. Przed pisaniem zapytań sprawdź wersję i status instalacji za pomocą SELECT postgis_full_version(); — upewnij się, że wszystkie komponenty są zainstalowane i zaktualizowane.

  3. Przy tworzeniu tabel z danymi przestrzennymi stosuj konwencje: kolumnę geometryczną nazwij geom, a kolumnę geograficzną geog. Dodaj indeksy BRIN dla dużych tabel przeznaczonych do ad-hoc zapytań, a dla tabel cache z kluczem głównym rozważ użycie klauzuli including w indeksie.

  4. Pisz kod SQL małymi literami, chyba że instrukcja mówi inaczej. Funkcje PostGIS zapisuj zgodnie z oficjalnym manuelem (np. ST_Segmentize z dużymi literami). Każde CREATE lub CTE opatrz komentarzem -- wyjaśniającym jego cel.

  5. Przy debugowaniu upewnij się, że komunikaty błędów są zrozumiałe dla programisty — nie używaj fallbacków typu lat/lon=0, zamiast tego obsługuj brak danych w reszcie kodu i poinformuj użytkownika. Migracje SQL pisz idempotentnie (drop if exists + create as) i zawsze twórz pary up/down dla łatwości iteracji.

  6. Przy pracy z rasterami importuj dane bezpośrednio do bazy zamiast operować na systemie plików przez GDAL — zarządzaj wszystkim wewnątrz PostgreSQL.

Related skills

postgresql-psql

by timelessco

Comprehensive guide for PostgreSQL psql - the interactive terminal client for PostgreSQL. Use when connecting to PostgreSQL databases, executing queries, managing databases/tables, configuring connection options, formatting output, writing scripts, managing transactions, and

Backend
34173

video-downloader

by ComposioHQ

Downloads videos from YouTube and other platforms for offline viewing, editing, or archival. Handles various formats and quality options.

Backend
50173

architecture-decision-records

by wshobson

Write and maintain Architecture Decision Records (ADRs) following best practices for technical decision documentation. Use when documenting significant technical decisions, reviewing past architectural choices, or establishing decision processes.

Backend
29130

openspec

by ruan-cat

OpenSpec 中文版规范助手 - 规范驱动的 AI 编程开发,帮助初始化、创建提案、编写规格、校验格式并归档变更。触发条件: 当用户提及 openspec、规范文档、需求管理、变更提案、spec-driven development 等关键词时主动调用。

Backend
27122

effective-go

by openshift

Apply Go best practices, idioms, and conventions from golang.org/doc/effective_go. Use when writing, reviewing, or refactoring Go code to ensure idiomatic, clean, and efficient implementations.

Backend
248296

fastapi-pro

by sickn33

Build high-performance async APIs with FastAPI, SQLAlchemy 2.0, and Pydantic V2. Master microservices, WebSockets, and modern Python async patterns. Use PROACTIVELY for FastAPI development, async optimization, or API architecture.

Backend
54128