cockroachdb / cockroachdb/cockroach

sql: internal error invalid data type

Open
#114,848 1 comment 0 reactions 0 assignees View on GitHub
C-bug O-pg-regress O-qa P-3 T-sql-queries
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

Repro:
```
CREATE SEQUENCE sequence_test4 INCREMENT BY -1;
SELECT * FROM pg_sequence_parameters('sequence_test4'::regclass);
```

Stacktrace:
```
ERROR: internal error: invalid datum type given: INT8, expected RECORD
SQLSTATE: XX000
DETAIL: stack trace:
github.com/cockroachdb/cockroach/pkg/sql/rowenc/encoded_datum.go:195: DatumToEncDatum()
github.com/cockroachdb/cockroach/pkg/sql/rowexec/project_set.go:334: toEncDatum()
github.com/cockroachdb/cockroach/pkg/sql/rowexec/project_set.go:241: nextGeneratorValues()
github.com/cockroachdb/cockroach/pkg/sql/rowexec/project_set.go:313: Next()
github.com/cockroachdb/cockroach/pkg/sql/colexec/columnarizer.go:239: Next()
github.com/cockroachdb/cockroach/pkg/sql/colflow/stats.go:118: next()
github.com/cockroachdb/cockroach/pkg/sql/colexecerror/error.go:92: CatchVectorizedRuntimeError()
github.com/cockroachdb/cockroach/pkg/sql/colflow/stats.go:126: Next()
github.com/cockroachdb/cockroach/pkg/sql/colflow/flow_coordinator.go:250: nextAdapter()
github.com/cockroachdb/cockroach/pkg/sql/colexecerror/error.go:92: CatchVectorizedRuntimeError()
github.com/cockroachdb/cockroach/pkg/sql/colflow/flow_coordinator.go:254: next()
github.com/cockroachdb/cockroach/pkg/sql/colflow/flow_coordinator.go:286: Run()
github.com/cockroachdb/cockroach/pkg/sql/colflow/vectorized_flow.go:320: Run()
github.com/cockroachdb/cockroach/pkg/sql/distsql_running.go:910: Run()
github.com/cockroachdb/cockroach/pkg/sql/distsql_running.go:1957: PlanAndRun()
github.com/cockroachdb/cockroach/pkg/sql/distsql_running.go:1672: func3()
github.com/cockroachdb/cockroach/pkg/sql/distsql_running.go:1675: PlanAndRunAll()
github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:2302: execWithDistSQLEngine()
github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:1861: dispatchToExecutionEngine()
github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:1092: execStmtInOpenState()
github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:145: func1()
github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:3277: execWithProfiling()
github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:144: execStmt()
github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2227: func1()
github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2232: execCmd()
github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2149: run()
github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:952: ServeConn()
github.com/cockroachdb/cockroach/pkg/sql/pgwire/conn.go:247: processCommands()
github.com/cockroachdb/cockroach/pkg/sql/pgwire/server.go:1001: func3()
src/runtime/asm_amd64.s:1650: goexit()

HINT: You have encountered an unexpected error.

Please check the public issue tracker to check whether this problem is
already tracked. If you cannot find it there, please report the error
with details by creating a new issue.

If you would rather not post publicly, please contact us directly
using the support form.

We appreciate your feedback.
```

postgres does not error

Found in pg_regress sequence

Jira issue: CRDB-33714

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.