Skip to content

Seemingly pointless test #1807

Closed
Closed

Description

@LucaCappelletti94

While implementing the support for INHERITS, I happened to find this test which contains in its name the word inherit and I suppose may reference the CREATE ROLE INHERIT, but it not present in the actual test.

If this test is actually pointless, it may be best to remove it. Do let me know how to proceed.

#[test]
fn parse_create_table_with_inherit() {
    let sql = "\
               CREATE TABLE bazaar.settings (\
               settings_id UUID PRIMARY KEY DEFAULT uuid_generate_v4() NOT NULL, \
               user_id UUID UNIQUE, \
               value TEXT[], \
               use_metric BOOLEAN DEFAULT true\
               )";
    pg().verified_stmt(sql);
}

Activity

  1. LucaCappelletti94 commented on Apr 27, 2025

    @LucaCappelletti94
    ContributorAuthor

    Ping to request I am expected to do with this, happy to remove the test if it is indeed pointless.

  2. alamb commented on Sep 28, 2026

    @alamb
    Contributor

    If this test is actually pointless, it may be best to remove it. Do let me know how to proceed.

    It would be good to look at the PR that added it to see if there was some additional history

  3. LucaCappelletti94 commented on Sep 28, 2026

    @LucaCappelletti94
    ContributorAuthor

    When I wrote the issue a while back I had checked it, but now I did not recall anymore and so I started an opus investigation which matches my recollection of it. Here is its summary:

    The test came from ivanceras in #20 (commit 78c054e, 2018). In that first version the SQL ended with INHERITS (system.record), which the parser of the time silently ignored because it stopped after the closing parenthesis. A week later, the refactor in 5abd9e7 (same PR) turned the test into a to_string() round trip, and the INHERITS clause was dropped because the AST could not render it. The name outlived the clause it was about. INHERITS itself has been covered since #1806 by parse_create_table_with_inherits, and the column features the old SQL still exercised (TEXT[], BOOLEAN DEFAULT true, DEFAULT ... NOT NULL) are covered by parse_create_table_from_pg_dump and the array DDL tests, so #2595 lost no coverage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions