cockroachdb / cockroachdb/cockroach
plpgsql: different error message for root block
Open
A-sql-plpgsql
A-sql-routine
C-bug
O-qa
T-sql-queries
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
```sql
DROP PROCEDURE IF EXISTS p;
CREATE PROCEDURE p() LANGUAGE PLpgSQL AS $$
<>
BEGIN
<>
LOOP
continue block_label WHEN true;
END LOOP;
END;
$$;
CALL p();
```
```
-- postgres: ERROR: 42601: block label "block_label" cannot be used in CONTINUE
-- crdb: ERROR: there is no label "block_label" attached to any block or loop enclosing this statement
```
I think the difference is only present for the root block (as if the root block's label is ignored).
Jira issue: CRDB-37737
Contributor guide
Assessment
This issue has not been assessed yet.