cockroachdb / cockroachdb/cockroach

sqlsmith: add support for PLpgSQL to query generator

Open
#106,368 2 comments 0 reactions 0 assignees View on GitHub
A-sql-plpgsql A-sql-udf C-enhancement T-sql-queries
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

We should add PLpgSQL support to our randomized testing suite to increase coverage.

Feature checklist:

- [x] Blocks
- [x] Declarations
- [x] Return statements
- [x] If / ElsIf / Else statements
- [x] Null statements
- [x] Assign statements
- [x] Inline SQL statements
- [x] For (int) loops
- [ ] CALL statements
- [ ] Exceptions
- [x] SELECT / RETURNING INTO syntax
---
- [ ] Cursor declarations
- [ ] Cursor open/fetch/close
- [ ] Case statements
- [x] (While) Loops
- [x] For (query) loops
- [x] Exit/Continue
- [ ] Raise statements
- [ ] Assert statements
- [ ] Return Next/Query
- [ ] PERFORM syntax
- [ ] Get diagnostics
- [ ] Commit/Rollback
- [ ] Dynamic SQL execution
- [ ] RECORD types

Note that some of these features are not yet implemented in PL/pgSQL - see also #117744.

Jira issue: CRDB-29534
Epic: CRDB-34182

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.