RobinBlomberg / kysely-codegen

Generate Kysely type definitions from your database.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Postgres: If you have subpartitions of a table, it generates types for each subpartition table, not the parent table.

saddiqs1 opened this issue · comments

Imagine the following schema:

info

column type
id SERIAL PRIMARY KEY
name TEXT

I have multiple partitions of this table, e.g. info_1, info_2 ...

When I generate the types, I expect to get the types of info since I query directly on info, however I get types generated for info_1 and info_2. In this example this is not an issue, however in my application I have over 200+ partitions, and I want to query on the parent table for it to allow postgres to handle which partition it targets.

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar

Hey! I would like to thank whoever funded this issue, and I will make sure to look at this as soon as possible. I have not really worked with subpartitions in Postgres, so I will have to do some experimentation, and also determine if this is a kysely or kysely-codegen issue. Stay tuned!