Skip to content
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

PostgreSQL arrays fail to generate and does not issue error #488

Open
CJCombrink opened this issue Jun 13, 2023 · 2 comments
Open

PostgreSQL arrays fail to generate and does not issue error #488

CJCombrink opened this issue Jun 13, 2023 · 2 comments

Comments

@CJCombrink
Copy link
Contributor

CJCombrink commented Jun 13, 2023

The following table fails to generate a C++ Header:

CREATE TABLE public.my_table
(
    name                TEXT         UNIQUE NOT NULL,
    description         TEXT         DEFAULT NULL,
    vals                INTEGER[]    NOT NULL
);

I also don't get any errors when running the script

My command is:

ddl2cpp -split-tables -no-timestamp-warning create.sql generated my::namespace
@rbock
Copy link
Owner

rbock commented Jun 14, 2023

I saw that you have a fix for this in #489 . Could you share it in a PR?

@CJCombrink
Copy link
Contributor Author

Unfortunately I do not have a fix. I "hacked" it to work.
Our real problem is similar, thus the bug was picked up when I tried to make a minimal example.
What I did is I made the INTEGER[] a random word like asdf and added asdf as TEXT in the ddl2cpp file.
I then could generate the header and changed my random word back to INTEGER[] and ran the script on the database.

If I add INTEGER[] to ddl2cpp it does not generate as mentioned in the issue

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