Skip to content
Snippets Groups Projects
Commit 1a553992 authored by Maksim Kaitmazian's avatar Maksim Kaitmazian
Browse files

feat(sql): support IF EXIST and IF NOT EXISTS options

Note that after this merge request, we no longer validate whether the format
of the created object matches with the schema. Consequently, we do not
suppress errors if formats match anymore.

Before:
```sql
CREATE USER u WITH PASSWORD 'Passw0rd'
1
CREATE USER u WITH PASSWORD 'Passw0rd'
0
CREATE USER u WITH PASSWORD 'DifferentPassw0rd'
error: user already exists with different auth method
```

Now:
```sql
CREATE USER u WITH PASSWORD 'Passw0rd'
1
CREATE USER u WITH PASSWORD 'Passw0rd'
error: user u already exists
CREATE USER u WITH PASSWORD 'DifferentPassw0rd'
error: user u already exists
CREATE USER IF NOT EXISTS u WITH PASSWORD 'DifferentPassw0rd'
0
```
parent 8d0f19e6
No related branches found
No related tags found
1 merge request!1291feat(sql): support IF EXISTS and IF NOT EXISTS options
Pipeline #52220 canceled
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment