Skip to content

Conversation

@pavan-postgres
Copy link

Updated the logic for determining suffixes of partitioned tables.

Previous implementation always appended '_p' for partitioned tables:

v_suffix := format('%s%s', CASE WHEN p_table_partition THEN '_p' END, p_suffix);

New logic allows using a simple naming convention for child tables without affecting existing behavior:

v_suffix := format('%s%s',
    CASE
        WHEN p_table_partition AND p_simple_naming THEN '_'
        WHEN p_table_partition THEN '_p'
    END,
    p_suffix
);

This change enables specifying a custom prefix/suffix for child table names (via p_suffix) while preserving the original '_p' behavior for partitions that do not use simple naming. It makes the code more flexible without breaking existing functionality.

Updated the logic for determining suffixes of partitioned tables. 

Previous implementation always appended '_p' for partitioned tables:

    v_suffix := format('%s%s', CASE WHEN p_table_partition THEN '_p' END, p_suffix);

New logic allows using a simple naming convention for child tables without affecting existing behavior:

    v_suffix := format('%s%s',
        CASE
            WHEN p_table_partition AND p_simple_naming THEN '_'
            WHEN p_table_partition THEN '_p'
        END,
        p_suffix
    );

This change enables specifying a custom prefix/suffix for child table names (via `p_suffix`) while preserving the original '_p' behavior for partitions that do not use simple naming. It makes the code more flexible without breaking existing functionality.
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

Successfully merging this pull request may close these issues.

1 participant