cockroachdb / cockroachdb/cockroach

sql: correcty parse string literals like `'{int2,int4}'` as `[]regtype`

Open
#146,892 2 comments 1 reaction 0 assignees View on GitHub
C-bug O-community T-sql-queries X-blathers-triaged
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

**Describe the problem**

I'm trying to use `drizzle-kit introspect` on a CockroachDB database.

When evaluating any table, it errors out with
```
error: could not parse "{int,int8,int2}" as type regtype[]: could not parse "int" as type oid: strconv.ParseInt: parsing "int": invalid syntax
```

([I responded to an issue in that Repo with some details](https://github.com/drizzle-team/drizzle-orm/issues/845#issuecomment-2885402987))

**To Reproduce**

1. Connect to a CockroachDB database
2. Send SQL `select ('{int,int8,int2'::regtype[]);`
3. See error

Do the same for a PostgresQL database and compare.

**Expected behavior**

Originally, I expected drizzle-kit to be able to proceed and generate the initial schema/migration files.

Jira issue: CRDB-50769

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.