{
    "url": "https://delaparra-services.nl/skills/supabase-postgres-best-practices",
    "locale": "en",
    "title": "Supabase Postgres Best Practices | DeLaParra Services",
    "description": "Postgres best practices maintained by Supabase, for Postgres running anywhere. Load this skill BEFORE writing or changing anything that lives in a Postgres database: creating or altering tables and columns (including choosing column types), schema design, migrations and declarative schema files, RLS policies and the tests that verify them, indexes, triggers, database functions, queues and schedule",
    "alternates": {
        "en": "https://delaparra-services.nl/skills/supabase-postgres-best-practices",
        "nl": "https://delaparra-services.nl/nl/skills/supabase-postgres-best-practices"
    },
    "formats": {
        "csv": "https://delaparra-services.nl/skills/supabase-postgres-best-practices.csv",
        "md": "https://delaparra-services.nl/skills/supabase-postgres-best-practices.md",
        "json": "https://delaparra-services.nl/skills/supabase-postgres-best-practices.json",
        "zip": "https://delaparra-services.nl/skills/supabase-postgres-best-practices.zip",
        "pdf": "https://delaparra-services.nl/skills/supabase-postgres-best-practices.pdf"
    },
    "downloads": [
        {
            "url": "https://delaparra-services.nl/skills/supabase-postgres-best-practices.csv",
            "encodingFormat": "text/csv",
            "name": "supabase-postgres-best-practices.csv"
        },
        {
            "url": "https://delaparra-services.nl/skills/supabase-postgres-best-practices.json",
            "encodingFormat": "application/json",
            "name": "supabase-postgres-best-practices.json"
        },
        {
            "url": "https://delaparra-services.nl/skills/supabase-postgres-best-practices.md",
            "encodingFormat": "text/markdown",
            "name": "supabase-postgres-best-practices.md"
        },
        {
            "url": "https://delaparra-services.nl/skills/supabase-postgres-best-practices.pdf",
            "encodingFormat": "application/pdf",
            "name": "supabase-postgres-best-practices.pdf"
        },
        {
            "url": "https://delaparra-services.nl/skills/supabase-postgres-best-practices.zip",
            "encodingFormat": "application/zip",
            "name": "supabase-postgres-best-practices.zip"
        },
        {
            "url": "https://delaparra-services.nl/skills/supabase-postgres-best-practices/download",
            "encodingFormat": "application/zip",
            "name": "supabase-postgres-best-practices-files.zip"
        }
    ],
    "markdown": "# Supabase Postgres Best Practices\n\n \n\nPostgres best practices maintained by Supabase, for Postgres running anywhere. Load this skill BEFORE writing or changing anything that lives in a Postgres database: creating or altering tables and columns (including choosing column types), schema design, migrations and declarative schema files, RLS policies and the tests that verify them, indexes, triggers, database functions, queues and schedule\n\n \n\n**Licence** MIT\n\n \n\n**Source** supabase/agent-skills\n\n [Download zip](<https://delaparra-services.nl/skills/supabase-postgres-best-practices/download>)   \n\n# Supabase Postgres Best Practices\n\n \n\nComprehensive performance optimization guide for Postgres, maintained by Supabase. Contains rules across 8 categories, prioritized by impact to guide automated query optimization and schema design.\n\n \n\n## When to Apply\n\n \n\nReference these guidelines when:\n\n \n\n- Writing SQL queries or designing schemas \n- Implementing indexes or query optimization \n- Reviewing database performance issues \n- Configuring connection pooling or scaling \n- Optimizing for Postgres-specific features \n- Working with Row-Level Security (RLS)\n\n \n\n## Rule Categories by Priority\n\n    Priority Category Impact Prefix     1 Query Performance CRITICAL ` query- `   2 Connection Management CRITICAL ` conn- `   3 Security & RLS CRITICAL ` security- `   4 Schema Design HIGH ` schema- `   5 Concurrency & Locking MEDIUM-HIGH ` lock- `   6 Data Access Patterns MEDIUM ` data- `   7 Monitoring & Diagnostics LOW-MEDIUM ` monitor- `   8 Advanced Features LOW ` advanced- `    \n\n## How to Use\n\n \n\nRead individual rule files for detailed explanations and SQL examples:\n\n \n\n```\nreferences/query-missing-indexes.md\nreferences/query-partial-indexes.md\nreferences/_sections.md\n```\n\n \n\nEach rule file contains:\n\n \n\n- Brief explanation of why it matters \n- Incorrect SQL example with explanation \n- Correct SQL example with explanation \n- Optional EXPLAIN output or metrics \n- Additional context and references \n- Supabase-specific notes (when applicable)\n\n \n\n## References\n\n \n\n- https://www.postgresql.org/docs/current/ \n- https://supabase.com/docs \n- https://wiki.postgresql.org/wiki/Performance\\_Optimization \n- https://supabase.com/docs/guides/database/overview \n- https://supabase.com/docs/guides/auth/row-level-security\n\n \n\n## Files\n\n \n\n- ` CHANGELOG.md ` \n- ` LICENSE ` \n- ` SKILL.md ` \n- ` SOURCE.md ` \n- ` references/_contributing.md ` \n- ` references/_sections.md ` \n- ` references/_template.md ` \n- ` references/advanced-full-text-search.md ` \n- ` references/advanced-jsonb-indexing.md ` \n- ` references/conn-idle-timeout.md ` \n- ` references/conn-limits.md ` \n- ` references/conn-pooling.md ` \n- ` references/conn-prepared-statements.md ` \n- ` references/data-batch-inserts.md ` \n- ` references/data-n-plus-one.md ` \n- ` references/data-pagination.md ` \n- ` references/data-upsert.md ` \n- ` references/lock-advisory.md ` \n- ` references/lock-deadlock-prevention.md ` \n- ` references/lock-short-transactions.md ` \n- ` references/lock-skip-locked.md ` \n- ` references/monitor-explain-analyze.md ` \n- ` references/monitor-pg-stat-statements.md ` \n- ` references/monitor-vacuum-analyze.md ` \n- ` references/query-composite-indexes.md ` \n- ` references/query-covering-indexes.md ` \n- ` references/query-index-types.md ` \n- ` references/query-missing-indexes.md ` \n- ` references/query-partial-indexes.md ` \n- ` references/schema-constraints.md ` \n- ` references/schema-data-types.md ` \n- ` references/schema-foreign-key-indexes.md ` \n- ` references/schema-lowercase-identifiers.md ` \n- ` references/schema-partitioning.md ` \n- ` references/schema-primary-keys.md ` \n- ` references/security-privileges.md ` \n- ` references/security-rls-basics.md ` \n- ` references/security-rls-performance.md `\n\n \n\n## Related terms\n\n \n\n- [B-tree index](<https://delaparra-services.nl/knowledge-hub/b-tree-index>) \n- [composite index](<https://delaparra-services.nl/knowledge-hub/composite-index>) \n- [covering index](<https://delaparra-services.nl/knowledge-hub/covering-index>) \n- [Document / NoSQL Database](<https://delaparra-services.nl/knowledge-hub/document-nosql-database>) \n- [EXPLAIN / EXPLAIN ANALYZE](<https://delaparra-services.nl/knowledge-hub/explain-explain-analyze>) \n- [GIN index](<https://delaparra-services.nl/knowledge-hub/gin-index>) \n- [GiST index](<https://delaparra-services.nl/knowledge-hub/gist-index>) \n- [Globally Distributed SQL](<https://delaparra-services.nl/knowledge-hub/globally-distributed-sql>) \n- [hash index](<https://delaparra-services.nl/knowledge-hub/hash-index>) \n- [Managed Cache](<https://delaparra-services.nl/knowledge-hub/managed-cache>) \n- [Managed Database (SQL/Relational)](<https://delaparra-services.nl/knowledge-hub/managed-database-sqlrelational>)\n\n \n\n[Installing an agent skill in Claude Code, Codex, Cursor and Copilot](<https://delaparra-services.nl/manuals/een-skill-installeren-in-je-ai-assistent>)\n\n[HTML version](https://delaparra-services.nl/skills/supabase-postgres-best-practices)\n",
    "structured_data": {
        "@context": "https://schema.org",
        "@graph": [
            {
                "@type": "Organization",
                "@id": "https://delaparra-services.nl/#practice",
                "logo": "https://delaparra-services.nl/logo.png",
                "name": "DeLaParra Services",
                "legalName": "DeLaParra Services",
                "url": "https://delaparra-services.nl/",
                "description": "Bespoke software, web applications and mobile apps, developed in Laravel by a single developer in Groningen. Fixed price agreed in advance, full source code provided upon delivery.",
                "email": "info@delaparra-services.nl",
                "address": {
                    "@type": "PostalAddress",
                    "addressLocality": "Groningen",
                    "addressRegion": "Groningen",
                    "addressCountry": "NL"
                },
                "areaServed": "Groningen, the Netherlands",
                "knowsLanguage": [
                    "en",
                    "nl"
                ],
                "knowsAbout": [
                    "Web design and development",
                    "App development",
                    "Custom software and web applications",
                    "OpenSpec",
                    "AI code review",
                    "Your own coding agent"
                ],
                "founder": {
                    "@id": "https://delaparra-services.nl/#person"
                }
            },
            {
                "@type": "WebPage",
                "@id": "https://delaparra-services.nl/skills/supabase-postgres-best-practices#webpage",
                "url": "https://delaparra-services.nl/skills/supabase-postgres-best-practices",
                "name": "Supabase Postgres Best Practices | DeLaParra Services",
                "description": "Postgres best practices maintained by Supabase, for Postgres running anywhere. Load this skill BEFORE writing or changing anything that lives in a Postgres database: creating or altering tables and columns (including choosing column types), schema design, migrations and declarative schema files, RLS policies and the tests that verify them, indexes, triggers, database functions, queues and schedule",
                "isPartOf": {
                    "@id": "https://delaparra-services.nl/#website"
                },
                "about": {
                    "@id": "https://delaparra-services.nl/#practice"
                },
                "inLanguage": "en",
                "breadcrumb": {
                    "@id": "https://delaparra-services.nl/skills/supabase-postgres-best-practices#breadcrumb"
                }
            },
            {
                "@type": "BreadcrumbList",
                "@id": "https://delaparra-services.nl/skills/supabase-postgres-best-practices#breadcrumb",
                "itemListElement": [
                    {
                        "@type": "ListItem",
                        "position": 1,
                        "name": "Home",
                        "item": "https://delaparra-services.nl/"
                    },
                    {
                        "@type": "ListItem",
                        "position": 2,
                        "name": "Supabase Postgres Best Practices"
                    }
                ]
            },
            {
                "@type": "Person",
                "@id": "https://delaparra-services.nl/#person",
                "name": "Reinier de la Parra",
                "url": "https://delaparra-services.nl/about"
            },
            {
                "@type": "SoftwareSourceCode",
                "@id": "https://delaparra-services.nl/skills/supabase-postgres-best-practices#skill",
                "url": "https://delaparra-services.nl/skills/supabase-postgres-best-practices",
                "name": "Supabase Postgres Best Practices",
                "description": "Postgres best practices maintained by Supabase, for Postgres running anywhere. Load this skill BEFORE writing or changing anything that lives in a Postgres database: creating or altering tables and columns (including choosing column types), schema design, migrations and declarative schema files, RLS policies and the tests that verify them, indexes, triggers, database functions, queues and schedule",
                "inLanguage": "en",
                "license": "https://spdx.org/licenses/MIT.html",
                "subjectOf": {
                    "@id": "https://delaparra-services.nl/skills/supabase-postgres-best-practices#dataset"
                }
            },
            {
                "@type": "Dataset",
                "@id": "https://delaparra-services.nl/skills/supabase-postgres-best-practices#dataset",
                "name": "Supabase Postgres Best Practices",
                "description": "Postgres best practices maintained by Supabase, for Postgres running anywhere. Load this skill BEFORE writing or changing anything that lives in a Postgres database: creating or altering tables and columns (including choosing column types), schema design, migrations and declarative schema files, RLS policies and the tests that verify them, indexes, triggers, database functions, queues and schedule",
                "url": "https://delaparra-services.nl/skills/supabase-postgres-best-practices",
                "identifier": "https://delaparra-services.nl/skills/supabase-postgres-best-practices#dataset",
                "about": {
                    "@id": "https://delaparra-services.nl/skills/supabase-postgres-best-practices#skill"
                },
                "creditText": "supabase/agent-skills",
                "publisher": {
                    "@id": "https://delaparra-services.nl/#practice"
                },
                "license": "https://spdx.org/licenses/MIT.html",
                "isAccessibleForFree": true,
                "inLanguage": "en",
                "dateModified": "2026-11-28T14:00:12+00:00",
                "isPartOf": {
                    "@type": "Dataset",
                    "@id": "https://delaparra-services.nl/knowledge-hub#skills",
                    "name": "Skills for AI coding assistants",
                    "url": "https://delaparra-services.nl/knowledge-hub"
                },
                "includedInDataCatalog": {
                    "@type": "DataCatalog",
                    "@id": "https://delaparra-services.nl/knowledge-hub#catalog",
                    "name": "Knowledge hub data catalog",
                    "url": "https://delaparra-services.nl/knowledge-hub"
                },
                "distribution": [
                    {
                        "@type": "DataDownload",
                        "name": "supabase-postgres-best-practices.csv",
                        "encodingFormat": "text/csv",
                        "contentUrl": "https://delaparra-services.nl/skills/supabase-postgres-best-practices.csv",
                        "inLanguage": "en",
                        "dateModified": "2026-11-28T14:00:12+00:00",
                        "license": "https://spdx.org/licenses/MIT.html"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "supabase-postgres-best-practices.json",
                        "encodingFormat": "application/json",
                        "contentUrl": "https://delaparra-services.nl/skills/supabase-postgres-best-practices.json",
                        "inLanguage": "en",
                        "dateModified": "2026-11-28T14:00:12+00:00",
                        "license": "https://spdx.org/licenses/MIT.html"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "supabase-postgres-best-practices.md",
                        "encodingFormat": "text/markdown",
                        "contentUrl": "https://delaparra-services.nl/skills/supabase-postgres-best-practices.md",
                        "inLanguage": "en",
                        "dateModified": "2026-11-28T14:00:12+00:00",
                        "license": "https://spdx.org/licenses/MIT.html"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "supabase-postgres-best-practices.pdf",
                        "encodingFormat": "application/pdf",
                        "contentUrl": "https://delaparra-services.nl/skills/supabase-postgres-best-practices.pdf",
                        "inLanguage": "en",
                        "dateModified": "2026-11-28T14:00:12+00:00",
                        "license": "https://spdx.org/licenses/MIT.html"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "supabase-postgres-best-practices.zip",
                        "encodingFormat": "application/zip",
                        "contentUrl": "https://delaparra-services.nl/skills/supabase-postgres-best-practices.zip",
                        "inLanguage": "en",
                        "dateModified": "2026-11-28T14:00:12+00:00",
                        "license": "https://spdx.org/licenses/MIT.html"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "supabase-postgres-best-practices-files.zip",
                        "encodingFormat": "application/zip",
                        "contentUrl": "https://delaparra-services.nl/skills/supabase-postgres-best-practices/download",
                        "inLanguage": "en",
                        "dateModified": "2026-11-28T14:00:12+00:00",
                        "license": "https://spdx.org/licenses/MIT.html"
                    }
                ]
            }
        ]
    }
}