dolthub / dolthub/dolt

`dolt_procedures` table does not exist until a procedure is created

Closed
#6,152 1 comment 0 reactions 1 assignee Claimed by @zachmu View on GitHub
bug sql
Dominant language
Go
Stars
24.4k
Forks
873
Avg merge
1d 8h
Merged PRs (30d)
120

Description

Repro shell script:
```sh
rm -rf db
mkdir db
cd db
dolt init

dolt sql -q "SELECT * FROM dolt_procedures;"
dolt sql -q "CREATE PROCEDURE p1(x INT) SELECT x;"
dolt sql -q "SELECT * FROM dolt_procedures;"
```

Output:
```txt
Successfully initialized dolt data repository.
error on line 1 for query SELECT * FROM dolt_procedures: table not found: dolt_procedures
table not found: dolt_procedures
+------+-------------------------------------+----------------------------+----------------------------+
| name | create_stmt | created_at | modified_at |
+------+-------------------------------------+----------------------------+----------------------------+
| p1 | CREATE PROCEDURE p1(x INT) SELECT x | 2023-06-14 22:48:42.488289 | 2023-06-14 22:48:42.488289 |
+------+-------------------------------------+----------------------------+----------------------------+
```

The first `SELECT * FROM dolt_procedures;` will fail, but will succeed after we create a procedure.

This seems like a poor user experience, `dolt_procedures` should appear as empty when there are no procedures.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.