drawdb-io / drawdb-io/drawdb

PostgreSQL schema import that contains a DEFAULT field value made up of functions

Open
#431 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
39.5k
Forks
3.2k
Avg merge
10h 46m
Merged PRs (30d)
16

Description

Hi!

During the import of an SQL statement which was created from a pg_dump I ran into an issue default values that contain functions like this:

```sql
CREATE TABLE public.person (
id bigint NOT NULL,
(...)
external_id character varying(255) DEFAULT "substring"(md5((random())::text), 1, 6),
);
```

As soon as I remove the DEFAULT instruction here, the import works fine.
This is a very nieche problem, so I just wanted to raise awareness here :)

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.