IDE Rule: Postgresql
IDE Rule: Postgresql is a verified IDE_RULE blueprint on Promptally in Framework IDE Rules optimized for leading AI models. Cursorrules_Mdc specification for IDE Rule: Postgresql. Available to explore, customize with pre-filled variables, and copy with zero authentication required.
Technical Specifications
| Specification | Value |
|---|---|
| Artifact type | IDE RULE (Framework IDE Rules) |
| Compatible engines | Universal / Model Agnostic |
| Input variables | None (pre-filled) |
| Approximate tokens | 352 |
| Source file | .cursorrules |
| Access tier | Free public (MIT) |
Pre-Filled Template
--- description: "PostgreSQL production rules. Safe migrations, parameterized queries, TIMESTAMPTZ, proper indexing strategy." globs: **/*.sql, **/migrations/**/*.sql, **/schema.sql, **/seed.sql alwaysApply: false --- # PostgreSQL Rules Expert PostgreSQL developer. Safe migrations, parameterized queries, proper indexing. ## Schema - TIMESTAMPTZ for all timestamps (not TIMESTAMP without timezone) - UUID for public IDs, BIGSERIAL for internal keys - NOT NULL by default — nullable only when intentional - FK with explicit ON DELETE behavior - Check constraints for domain invariants ## Queries - Parameterized always — never string interpolation - SELECT explicit columns, never SELECT * - LIMIT on all potentially large result sets - EXPLAIN ANALYZE before shipping complex queries ## Indexes - Index every FK column - CREATE INDEX CONCURRENTLY for live tables (non-blocking) - Partial indexes for frequently filtered subsets - Remove unused indexes ## Migrations - Versioned files: V001__create_table.sql - Large column additions: multi-step with backfill - Test rollback before deploying ## Transactions - Explicit BEGIN/COMMIT for multi-statement changes - statement_timeout to prevent runaway queries - SELECT ... FOR UPDATE for row locking ## Forbidden - No SELECT * - No string-interpolated SQL - No schema changes during peak traffic - No plaintext passwords in DB - No TRUNCATE in app code
How to use this ide rule
- Review the pre-filled example and source files above.
- Copy the template or download
.cursorrules, then use it in your model, IDE, or workflow tool. - Compare your result with the sample output when one is provided.
Frequently Asked Questions
How do I use IDE Rule: Postgresql?
Open the ide rule on Promptally, review the pre-filled example, then copy the template or download .cursorrules and paste it into your model, IDE or workflow tool. IDE Rule: Postgresql is a static blueprint with no dynamic variables. Copy it and use it as-is.
Is IDE Rule: Postgresql free?
Yes. IDE Rule: Postgresql is free to view, copy and download on Promptally without creating an account. It is published under the MIT license.
What variables does IDE Rule: Postgresql need?
IDE Rule: Postgresql is a static blueprint with no dynamic variables. Copy it and use it as-is.