Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
tibeer opened this issue Apr 29, 2025 · 1 comment

Comments

@tibeer
Copy link

tibeer commented Apr 29, 2025

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:

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 :)

@tibeer tibeer changed the title PostgrSQL schema import that contains a DEFAULT field value made up of functions PostgreSQL schema import that contains a DEFAULT field value made up of functions Apr 29, 2025
@1ilit
Copy link
Member

1ilit commented Apr 29, 2025

hello, this is coming from the parser that drawdb uses to import sql statements, will report it, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants