drizzle-team / drizzle-team/drizzle-orm

[FEATURE]: Add support for range column types

Open
#2,700 13 comments 88 reactions 0 assignees View on GitHub
db/postgres drizzle/kit enhancement
Dominant language
TypeScript
Stars
35.8k
Forks
1.6k
Avg merge
2d 7h
Merged PRs (30d)
4

Description

### Describe what you want

Add support for:
- int4range — Range of integer, int4multirange — corresponding Multirange
- int8range — Range of bigint, int8multirange — corresponding Multirange
- numrange — Range of numeric, nummultirange — corresponding Multirange
- tsrange — Range of timestamp without time zone, tsmultirange — corresponding Multirange
- tstzrange — Range of timestamp with time zone, tstzmultirange — corresponding Multirange
- daterange — Range of date, datemultirange — corresponding Multirange

See postgresql documentation [here](https://www.postgresql.org/docs/current/rangetypes.html)

Should be able to create columns, or columns to be introspected from existing dbs (the latter being my case):
```js
timestamp_range: tstzrange('timestamp_range').notNull()...
```

Thank you,

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the existing PostgreSQL column-type support and the PostgreSQL range-type documentation linked in the issue. Trace how column definitions are created and how existing database columns are introspected, then verify support for the listed range and multirange types in both paths.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgresql, typescript
Domain
databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.