Skip to content

fix: handle ON CONFLICT for non-auto-generated primary keys in PL/pgSQL mode#16

Merged
edraobdu merged 1 commit intomainfrom
fix/on-conflict
Dec 31, 2025
Merged

fix: handle ON CONFLICT for non-auto-generated primary keys in PL/pgSQL mode#16
edraobdu merged 1 commit intomainfrom
fix/on-conflict

Conversation

@edraobdu
Copy link
Owner

When using PL/pgSQL mode with string or manually-set primary keys, the generated INSERT statements now properly include ON CONFLICT clauses for idempotency. This prioritizes non-auto-generated PKs (string, UUID, manual integer IDs) over unique constraints, ensuring the SQL can be safely re-executed without failure. Includes comprehensive test coverage for string PKs, composite PKs, and mixed scenarios.

🤖 Generated with Claude Code

@edraobdu edraobdu self-assigned this Dec 31, 2025
…QL mode

When using PL/pgSQL mode with string or manually-set primary keys, the generated
INSERT statements now properly include ON CONFLICT clauses for idempotency. This
prioritizes non-auto-generated PKs (string, UUID, manual integer IDs) over unique
constraints, ensuring the SQL can be safely re-executed without failure. Includes
comprehensive test coverage for string PKs, composite PKs, and mixed scenarios.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@edraobdu edraobdu merged commit 6fa3fb5 into main Dec 31, 2025
6 checks passed
@edraobdu edraobdu deleted the fix/on-conflict branch December 31, 2025 16:47
@github-actions github-actions bot mentioned this pull request Dec 31, 2025
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant