Back to directory

Fmgr and Spi

Agent skill
1 skill

Write a SQL-callable C function or call PostgreSQL fmgr / SPI from C — covers PGFUNCTIONINFOV1, PGGETARG / PGRETURN, PGARGISNULL, SRF set-returning function ValuePerCall and Materialize modes, composite / polymorphic returns, DirectFunctionCall / OidFunctionCall / FunctionCallInvoke fmgr entry points, plus SPIconnect / SPIexecute / SPIprepare / SPIfinish, plan caching, SPI cursors, subxact rollback, and SPI return codes. Use whenever a PG patch or extension adds a Datum foo(PGFUNCTIONARGS) entry point, exposes a set-returning function, calls fmgr from backend C, or embeds SQL via SPI in a backend / trigger / PL handler. Skip for plpgsql / PL/Python / PL/Perl user-side function authoring, libpq / psycopg / JDBC / node-postgres client-side query execution, generic executor questions (use executor-and-planner), and non-PG embedded SQL (Oracle OCI, SQLite C API).

Install with
Claude CodeCodexCursorGitHub CopilotGemini CLI

Supported by the Atlas install prompt. Skill-specific requirements vary.

Skill stats

Skills1CategorySecurityStars0

About this skill

Write a SQL-callable C function or call PostgreSQL fmgr / SPI from C — covers PGFUNCTIONINFOV1, PGGETARG / PGRETURN, PGARGISNULL, SRF set-returning function ValuePerCall and Materialize modes, composite / polymorphic returns, DirectFunctionCall / OidFunctionCall / FunctionCallInvoke fmgr entry points, plus SPIconnect / SPIexecute / SPIprepare / SPIfinish, plan caching, SPI cursors, subxact rollback, and SPI return codes. Use whenever a PG patch or extension adds a Datum foo(PGFUNCTIONARGS) entry point, exposes a set-returning function, calls fmgr from backend C, or embeds SQL via SPI in a backend / trigger / PL handler. Skip for plpgsql / PL/Python / PL/Perl user-side function authoring, libpq / psycopg / JDBC / node-postgres client-side query execution, generic executor questions (use executor-and-planner), and non-PG embedded SQL (Oracle OCI, SQLite C API).

Quick start

  1. Copy the install prompt. Use the green button above this README.
  2. Send it to your agent. Paste it into your coding agent’s chat and send.
  3. Review the setup. Your agent checks the skill’s instructions, requirements, and installation scope.
Review, license & listing details
Review the source before using this skill

This is an imported listing. We haven’t certified its safety, license, or compatibility. Skills may include executable scripts.

Automated security scan: Partial

Only SKILL.md was scanned. Supporting files and scripts were not checked. No safety grade has been assigned.

0 potential findings · Scanned 11/4/2026 · Scanner 0.2.1

Content SHA-256: 0408c412b2bdaf3c802cc78cf62e74c2a15058f37c5ee0f9e0eb868b6feb9d3e

About scan coverage and limitations

About this listing

Category
Security
Reported license
PostgreSQL
Listing language (estimated)
English
Review status
Not individually reviewed
Agent compatibility
Atlas installation supports Claude Code, Codex, and Cursor. Skill-specific dependencies and features are checked during setup.