support range types
- Dominant language
- Go
- Stars
- 2.1k
- Forks
- 73
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 129
Description
the elixir postgrex client expects results from this query:
```
SELECT t.oid,
t.typname,
t.typsend,
t.typreceive,
t.typoutput,
t.typinput,
COALESCE(d.typelem, t.typelem),
COALESCE(r.rngsubtype, 0),
array
(
select a.atttypid
FROM pg_attribute AS a
WHERE a.attrelid = t.typrelid
AND a.attnum > 0
AND NOT a.attisdropped
ORDER BY a.attnum )
FROM pg_type AS t
LEFT JOIN pg_type AS d
ON t.typbasetype = d.oid
LEFT JOIN pg_range AS r
ON r.rngtypid = t.oid
OR r.rngmultitypid = t.oid
OR (
t.typbasetype <> 0
AND r.rngtypid = t.typbasetype)
WHERE (
t.typrelid = 0)
AND (
t.typelem = 0
OR NOT EXISTS
(
SELECT 1
FROM pg_catalog.pg_type s
WHERE s.typrelid != 0
AND s.oid = t.typelem));
```
need to support range types:
```
int4range
numrange
tsrange
tstzrange
daterange
int8range
```
Contributor guide
Research direction
Start with the PostgreSQL type-metadata query shown in the issue and trace how its OID, subtype, and range-related columns are consumed. Verify support for int4range, numrange, tsrange, tstzrange, daterange, and int8range; done means the Elixir postgrex client receives the expected results for these types.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, postgresql
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100