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

Add support for INHERITS in postgres dialect #191

Closed
ahaessly opened this issue Feb 16, 2023 · 2 comments
Closed

Add support for INHERITS in postgres dialect #191

ahaessly opened this issue Feb 16, 2023 · 2 comments
Assignees

Comments

@ahaessly
Copy link

ahaessly commented Feb 16, 2023

Is your feature request related to a problem? Please describe.
I use INHERITS in my postgres schema. The parser does not recognize create table statements that use INHERITS

Describe the solution you'd like
Create entries for tables that use INHERITS with their inherited fields

Describe alternatives you've considered
Currently I have to manually edit my ddl for any tables that use INHERITS

Additional context

CREATE TABLE public.identifier (
    system text NOT NULL,
    value text NOT NULL
);

CREATE TABLE public."Diagnosis" (
    id text NOT NULL,
);

CREATE TABLE public."Diagnosis_identifier" (
    "Diagnosis_id" text NOT NULL
)
INHERITS (public.identifier);

resulting file does not include a table for Diagnosis_identifier

@xnuinside xnuinside self-assigned this Mar 29, 2023
@xnuinside
Copy link
Owner

@ahaessly Thanks for reporting the issue! Sorry for the delay with answer, I had a lot of personal things to do. I added support for INHERITS. It will be available in 0.30.0 version - I will add one more comment when I will release it to pypi

@xnuinside
Copy link
Owner

@ahaessly I just released version 0.30.0, try it. Test was added - https://github.com/xnuinside/simple-ddl-parser/blob/main/tests/dialects/test_psql.py#L10, if will be needed anything more - open new issue. And thanks for reporting that!

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