用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/pluginagentmarketplace/custom-plugin-postgresql --skill postgresql-plpgsql命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | postgresql-plpgsql |
| description | Write PL/pgSQL - functions, procedures, triggers, error handling |
| version | 3.0.0 |
| sasmp_version | 1.3.0 |
| bonded_agent | 06-postgresql-plpgsql |
| bond_type | PRIMARY_BOND |
| category | database |
| difficulty | advanced |
| estimated_time | 4h |
Atomic skill for procedural programming
Production-ready patterns for functions, procedures, triggers, and exception handling.
parameters:
code_type:
type: string
required: true
enum: [function, procedure, trigger, aggregate]
volatility:
type: string
enum: [IMMUTABLE, STABLE, VOLATILE]
CREATE OR REPLACE FUNCTION func_name(p_param TYPE)
RETURNS return_type
LANGUAGE plpgsql STABLE SECURITY DEFINER
SET search_path = app, public
AS $$ DECLARE v_result TYPE; BEGIN
-- Logic
RETURN v_result;
EXCEPTION WHEN OTHERS THEN
RAISE WARNING '%', SQLERRM;
RETURN NULL;
END; $$;
CREATE OR REPLACE FUNCTION trigger_func() RETURNS TRIGGER AS $$
IF TG_OP NEW.updated_at : NOW(); IF;
;
; $$ plpgsql;
trg_name BEFORE t trigger_func();
| Category | Use Case |
|---|---|
| IMMUTABLE | Math, formatting |
| STABLE | Lookups (no writes) |
| VOLATILE | INSERT, random() |
EXCEPTION
WHEN unique_violation THEN ... -- 23505
WHEN foreign_key_violation THEN ... -- 23503
WHEN OTHERS THEN RAISE EXCEPTION '% [%]', SQLERRM, SQLSTATE;
| Error | Cause | Solution |
|---|---|---|
42883 | Function not found | Check signature |
42P13 | Invalid definition | Review syntax |
| Trigger not firing | Wrong timing | Check BEFORE/AFTER |
Skill("postgresql-plpgsql")