Plpgsql Internals
PostgreSQL's PL/pgSQL procedural-language implementation — `src/pl/plpgsql/src/` — the parser (`pl_gram.y` + `pl_scanner.c`), compiler (`pl_comp.c` — turns source text into `PLpgSQL_function` struct), executor (`pl_exec.c` — the interpreter with 268 KB of statement handlers), function/DO/procedure dispatch (`pl_handler.c`), and the trusted-language sandbox boundary. Loads when the user asks about PL/pgSQL semantics not obvious from SQL (nested exceptions, RAISE / GET STACKED DIAGNOSTICS, cursor lifecycle, RECORD variables, EXECUTE dynamic SQL, GET DIAGNOSTICS, transaction control from within a procedure, plan caching for expressions, or the trusted-vs-untrusted distinction), when investigating "why is my PL/pgSQL slower than raw SQL" (typically plan-cache or exception-block reasons), when adding a new PL/pgSQL feature (has scenario `integrate-with-plpgsql`), or when working with PL/pgSQL security (recall from `2026-06-04-a9-plpgsql` session that trusted-PL gate is enforced exactly twice in `pl_handler.c`, EXECUTE has zero injection defenses, WHEN OTHERS swallows almost everything). Skip when the ask is about PL/Python / PL/Perl / PL/Tcl (see the sibling `src/pl/plpython/` etc.), or about SPI (a shared API — see `fmgr-and-spi`).
Security AStatic scan found no risk patternsHow grading works ›
From the source SKILL.md
PL/pgSQL is PG's most-used procedural language: functions, procedures, DO blocks, triggers. Under the hood it's a parser + compiler + interpreter living in a self-contained subdirectory. The interpreter (pl_exec.c) is 268 KB — the biggest source file in PG core after postmaster.c.
What this skill does
Plpgsql Internals is a community-contributed Claude Code skill in the zero-trust sub-category. It ships as a SKILL.md file that Claude Code auto-discovers under ~/.claude/skills/plpgsql-internals/ and loads when your prompt matches the skill's trigger.
Who uses this skill
The Plpgsql Internals Claude Code skill is built for security engineers, penetration testers, DevSecOps practitioners, and development teams hardening codebases and infrastructure. It's part of ClaudSkills (also referred to as Claude Skills or Claude Code Skills) — the open community-curated registry of 163,000+ SKILL.md files for Anthropic's Claude Code agent and the wider Claude ecosystem (Claude API, Claude Agent SDK).
How to install
Free
Manual install (2 steps)
mkdir -p ~/.claude/skills/plpgsql-internals
curl -L https://claudskills.com/skills/plpgsql-internals/SKILL.md \
-o ~/.claude/skills/plpgsql-internals/SKILL.md
Or just download SKILL.md directly and drop it into ~/.claude/skills/plpgsql-internals/. Claude Code auto-discovers it on next session.
Skills live at ~/.claude/skills/plpgsql-internals/SKILL.md on macOS/Linux, or %USERPROFILE%\.claude\skills\plpgsql-internals\SKILL.md on Windows. See the full install guide for step-by-step instructions.
Telegram
📱 Install from your phone or desktop Telegram
Open @claudskills_bot on Telegram, tap Open Desktop App, and the desktop app installs this skill for you. Or share the bot link with a colleague — they get the same one-tap install. Learn more →
Pro
One-click install via the desktop app
The ClaudSkills desktop app installs any skill directly into ~/.claude/skills/ with one click — no terminal required. Pro starts at $9/mo or $149 lifetime.
Pro
For the full experience including quality scoring and one-click install features for each skill — upgrade to Pro.
Frequently asked questions
How do I install the Plpgsql Internals Claude Code skill?
Install via the ClaudSkills desktop app (one click) or copy
SKILL.md from the source repository to
~/.claude/skills/plpgsql-internals/SKILL.md and restart Claude Code. Both flows are detailed at
claudskills.com/install/.
What does the Plpgsql Internals skill do?
PostgreSQL's PL/pgSQL procedural-language implementation — `src/pl/plpgsql/src/` — the parser (`pl_gram.y` + `pl_scanner.c`), compiler (`pl_comp.c` — turns source text into `PLpgSQL_function` struct), executor (`pl_exec.c` — the interpreter with 268 KB of statement handlers), function/DO/procedure dispatch (`pl_handler.c`), and the trusted-language sandbox boundary. Loads when the user asks about PL/pgSQL semantics not obvious from SQL (nested exceptions, RAISE / GET STACKED DIAGNOSTICS, cursor lifecycle, RECORD variables, EXECUTE dynamic SQL, GET DIAGNOSTICS, transaction control from within a procedure, plan caching for expressions, or the trusted-vs-untrusted distinction), when investigating "why is my PL/pgSQL slower than raw SQL" (typically plan-cache or exception-block reasons), when adding a new PL/pgSQL feature (has scenario `integrate-with-plpgsql`), or when working with PL/pgSQL security (recall from `2026-06-04-a9-plpgsql` session that trusted-PL gate is enforced exactly twice in `pl_handler.c`, EXECUTE has zero injection defenses, WHEN OTHERS swallows almost everything). Skip when the ask is about PL/Python / PL/Perl / PL/Tcl (see the sibling `src/pl/plpython/` etc.), or about SPI (a shared API — see `fmgr-and-spi`).
Is this skill free to install?
Yes. ClaudSkills is an open registry — every skill keeps its source repository's license, and manual install via copy is free. ClaudSkills Pro ($9/mo, $79/yr, or $149 one-time) adds one-click install via the desktop app and a multi-signal Quality Score.
When should I use the Plpgsql Internals skill?
Use Plpgsql Internals when your Claude Code task falls under the Security category — specifically in the zero trust area. Claude Code auto-discovers installed skills and invokes the right one based on the task description, so you can also ask Claude directly (e.g. "use Plpgsql Internals" or describe the task and let Claude pick). Browse related skills at
/category/security/.
What is a Claude Code skill and how does the Plpgsql Internals skill fit in?
A Claude Code skill is a
SKILL.md file that lives under
~/.claude/skills/<name>/ and tells the Claude Code CLI agent how to perform a specific task (instructions, prompts, allowed tools). Skills are auto-discovered at session start. Plpgsql Internals is one of 67,000+ skills indexed in the open ClaudSkills catalog, classified under the Security category. Learn more at
/learn/what-is-a-claude-skill/.
Attribution & license
Cite this skill
If you reference this skill in a blog post, paper, or documentation, you can cite it as:
APA
matejformanek. (2026). Plpgsql Internals [Claude Code skill]. ClaudSkills. https://claudskills.com/skills/plpgsql-internals/
BibTeX
@misc{plpgsql-internals-2026,
author = {matejformanek},
title = {Plpgsql Internals [Claude Code skill]},
year = {2026},
publisher = {ClaudSkills},
url = {https://claudskills.com/skills/plpgsql-internals/}
}
Embed this skill
Promote, attribute, or link this skill from your own README, blog post, or documentation. All three snippets are free to use — no sign-up, no API key. More distribution surfaces →
Badge
[](https://claudskills.com/skills/plpgsql-internals/?utm_source=badge&utm_medium=readme&utm_campaign=skill_badge)
<script>
<script src="https://claudskills.com/embed/plpgsql-internals.js" async></script>
<iframe>
<iframe src="https://claudskills.com/embed/plpgsql-internals.html" width="100%" height="160" frameborder="0" loading="lazy" title="ClaudSkills: Plpgsql Internals"></iframe>
Security scan
Grade A · scanned 2026-07-28 — free static scan against the OWASP Agentic Skills Top 10.
No risk patterns were found in any of the ten OWASP-aligned categories. How grading works ›
- ✓ Prompt injection
- ✓ Data exfiltration
- ✓ Supply chain
- ✓ Reverse shell
- ✓ Credentials
- ✓ Execution
- ✓ Filesystem
- ✓ Persistence
- ✓ Obfuscation
- ✓ Network
Show this grade on your repo (click to copy):
[](https://claudskills.com/skills/plpgsql-internals/#security)
More Security skills
Browse all Security skills in the ClaudSkills registry, or explore these other picks from the same category:
Part of Acreator Store — Adam Lankamer's AI tools:
PerfectStudio ·
Ucaption ·
UTagger ·
AutoXPoster ·
TestYourSkills ·
AutomationFlows ·
Au Naturel ·
Telegram @acreatorstore