dolthub / dolthub/doltgresql

support range types

Open
#2,859 0 comments 0 reactions 0 assignees View on GitHub
bug
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.