Using _table_pattern._deny in Postgres to deny partition tables with sample regex provided

Original Slack Thread

Hi guys, I need to use _table_pattern._deny in Postgres to deny partition tables, can you give me a sample?
partition tables are like this: table_name_p20231206

Hi Hakime, encourage using ChatGPT to refine to your needs but a regex would likely look like [\w\d_-]+p\d{8} which in human terms would be “any number of letters, digits and underscores followed by a ‘p’ character which is followed by exactly 8 digits.”

maybe with something like this you should be fine:

    deny:
       .*_p\d+$```

Hi Hakime, were you able to resolve your issue?