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

Avoid storage parameters during CREATE TABLE for partitioned tables #956

Merged

Conversation

robins
Copy link
Contributor

@robins robins commented Jul 15, 2024

In Postgres, CREATE TABLE WITH() allows storage parameters, but partitioned tables emit an error (given below) if attempted. This is because partitioned non-leaf tables are virutal tables [1] and don"t accept storage parameters.

Sample Error:
"ERROR: cannot specify storage parameters for a partitioned table"

This patch skips storage parameter generation for partitioned tables.

Ref:

  1. https://www.postgresql.org/docs/current/ddl-partitioning.html

CREATE TABLE WITH() allows storage parameters, but partitioned tables
emit an error (given below) if attempted. This is because partitioned
non-leaf tables are virutal tables [1] and don"t accept
storage parameters.

Sample Error:
"ERROR: cannot specify storage parameters for a partitioned table"

This patch skips storage parameter generation for partitioned tables.

Ref:
1. https://www.postgresql.org/docs/current/ddl-partitioning.html
Copy link
Contributor

@mrigger mrigger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@mrigger mrigger merged commit ec00b2d into sqlancer:main Jul 16, 2024
16 of 21 checks passed
@robins robins deleted the partitioned_table_disallows_storage_params branch July 17, 2024 13:44
malwaregarry pushed a commit to malwaregarry/sqlancer that referenced this pull request Aug 21, 2024
…qlancer#956)

CREATE TABLE WITH() allows storage parameters, but partitioned tables
emit an error (given below) if attempted. This is because partitioned
non-leaf tables are virutal tables [1] and don"t accept
storage parameters.

Sample Error:
"ERROR: cannot specify storage parameters for a partitioned table"

This patch skips storage parameter generation for partitioned tables.

Ref:
1. https://www.postgresql.org/docs/current/ddl-partitioning.html
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.

2 participants