postgresql-skill

This skill provides PostgreSQL-specific patterns for database design, optimization, and transaction management

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "postgresql-skill" with this command: npx skills add ingpoc/skills/ingpoc-skills-postgresql-skill

PostgreSQL Development

Purpose

PostgreSQL is a powerful relational database. This skill documents patterns for safe transactions, optimization, and concurrent access.

When to Use

Use this skill when:

  • Designing database schema
  • Creating migrations
  • Implementing transactions
  • Optimizing queries
  • Managing connections

Key Patterns

1. Transaction Management

Wrap operations in transactions:

async def transfer_funds(self, from_account, to_account, amount):
    async with self.db.transaction():
        await self.db.execute(
            "UPDATE accounts SET balance = balance - ? WHERE id = ?",
            (amount, from_account)
        )
        await self.db.execute(
            "UPDATE accounts SET balance = balance + ? WHERE id = ?",
            (amount, to_account)
        )

2. Connection Pooling

Use connection pools for efficiency:

pool = await asyncpg.create_pool(
    'postgresql://user:password@localhost/db',
    min_size=10,
    max_size=20
)

3. Query Optimization

Use proper indexing:

CREATE INDEX idx_user_email ON users(email);
CREATE INDEX idx_transaction_date ON transactions(created_at);

See Also

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

scroll-storyteller

No summary provided by upstream source.

Repository SourceNeeds Review
General

browser-testing

No summary provided by upstream source.

Repository SourceNeeds Review
General

terminal-ui-design

No summary provided by upstream source.

Repository SourceNeeds Review
General

tufte-slide-design

No summary provided by upstream source.

Repository SourceNeeds Review