dialect-postgresql

Write PostgreSQL dialect-compliant SQL queries with correct identifiers, casts, JSON operators, arrays, and intervals.

11|6|Updated Nov 15, 2025
One-click install
npx skills add https://github.com/mako-ai/mako --skill dialect-postgresql
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dialect-postgresql
Source: https://github.com/mako-ai/mako/tree/main/api/src/agent-skills/dialect-postgresql
Command: npx skills add https://github.com/mako-ai/mako --skill dialect-postgresql

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

PostgreSQL and Cloud SQL users often struggle with dialect-specific syntax and edge cases when writing or debugging complex queries. This skill provides a concise guide to identifiers, casts, JSON operators, arrays, pattern matching, intervals, and LIMIT syntax to help craft correct SQL across PostgreSQL variants.

Core Features & Use Cases

  • Syntax quick reference for common PostgreSQL features including identifiers, casts, string concatenation, date intervals, JSONB access, and array handling.
  • Example-driven guidance showing typical query patterns and best practices for schema-qualified tables.
  • Use Case: When migrating queries from other databases, or debugging correctness of complex expressions in PostgreSQL.

Quick Start

Provide PostgreSQL dialect-compliant SQL queries with correct identifiers, casts, JSON operators, arrays, and interval handling.

Frequently Asked Questions about dialect-postgresql

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write PostgreSQL queries with correct JSONB operators and array handling?

PostgreSQL queries with correct JSONB operators and array handling require specific syntax for accessing JSON keys and manipulating array elements. This skill provides concise examples for crafting valid expressions across schema-qualified tables.

What is the correct way to use casts and intervals in PostgreSQL syntax?

The correct way to use casts and intervals in PostgreSQL syntax involves explicit type casting and interval literals for date and time calculations. This skill offers example-driven guidance on these dialect-specific edge cases to ensure query correctness.

Can I use this PostgreSQL syntax reference for Cloud SQL connections?

Yes, this PostgreSQL syntax reference applies to Cloud SQL connections. The skill covers schema-qualified tables and LIMIT usage for real-world query authoring and debugging across PostgreSQL and Cloud SQL environments.

What's the best way to migrate SQL queries from other databases to PostgreSQL?

Migrating SQL queries to PostgreSQL requires adjusting identifiers, string concatenation, and pattern matching to match the target dialect. This skill provides a quick reference for translating query patterns and applying dialect-specific best practices.

Why does my PostgreSQL query fail on schema-qualified tables and LIMIT syntax?

PostgreSQL queries fail on schema-qualified tables and LIMIT syntax due to dialect-specific identifier rules and statement structures. This skill helps debug correctness by demonstrating valid LIMIT usage and schema-qualified table references.