Skip to content

Fetch migration version as i64 instead of i32 - #48

Closed
aloucks wants to merge 1 commit into
rust-db:masterfrom
aloucks:version-i64-master
Closed

aloucks wants to merge 1 commit into
rust-db:masterfrom
aloucks:version-i64-master

Conversation

@aloucks

@aloucks aloucks commented Feb 8, 2020

Copy link
Copy Markdown
Contributor

CockroachDB defaults INT fields to INT8 (64bit), which differs from the postgres behavior. The rust postgres driver panics when fetching the version number with the following message:

error retrieving column 0: error deserializing column 0: cannot convert
between the Rust type `i32` and the Postgres type `int8`

Using i64 instead of i32 resolves the issue.

@aloucks
aloucks force-pushed the version-i64-master branch from 015f9ad to 28cac7a Compare February 8, 2020 19:52
CockroachDB defaults `INT` fields to `INT8` (64bit), which differs
from the postgres behavior. The rust postgres driver panics when
fetching the version number with the following message:

	error retrieving column 0: error deserializing column 0: cannot convert
	between the Rust type `i32` and the Postgres type `int8`

Using `i64` instead of `i32` resolves the issue.
@akhilles

akhilles commented Feb 8, 2020 •

Copy link
Copy Markdown
Collaborator

Wouldn’t it be better to use INT4 in the refinery_schema_history table?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants