dreamsxin/example/postgresql

Claude Code and agent skill by dreamsxin/example

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Install

npx vskill@latest install dreamsxin/example/postgresql

SKILL.md

常用技巧

插入忽略

PERFORM

不需要查询结果的使用 PERFORM

使用rule规则
sql
CREATE RULE rule_insert_ignore AS ON insert TO table_name WHERE exists (SELECT 1 FROM table_name WHERE id = new.id) DO INSTEAD NOTHING;
使用触发器
sql
CREATE OR REPLACE FUNCTION sp_insert_ignore() RETURNS trigger AS $$
BEGIN
PERFORM 1 FROM table_name WHERE id = new.id;
IF FOUND THEN
RETURN null;
END IF;
RETURN new;
END;
$$ LANGUAGE plpgsql;
CREATE TRIGGER trigger_ignore BEFORE INSERT ON table_name FOR EACH ROW EXECUTE PROCEDURE sp_insert_ignore();
使用 WITH
sql
INSERT INTO table_name
WITH t(f1,f2) as (values(6,current_time),(3,current_time))
SELECT a.* FROM t as a where a.f1 not in (SELECT id FROM table_name );
使用 ON CONFLICT

如果是冲突更新需要定义 conflict_target,conflict_action 类型有 DO NOTHING、DO UPDATE

sql
INSERT INTO customer VALUES (100, 'Non-paying customer') ON CONFLICT (id) DO UPDATE SET name = EXCLUDED.name;

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
191
Repository forks
55
7-day trend score
26

Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 21 Mar 2026, 7 months ago.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/dreamsxin/example/postgresql/badge)](https://verified-skill.com/skills/dreamsxin/example/postgresql)

Something wrong with this skill or its page? Tell us.