Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@jordanlewis
Copy link
Member

@jordanlewis jordanlewis commented May 3, 2019

With the upgraded type system, we're now in the position to return the
right size of integers to clients that use the binary protocol. Do so.

Closes #36811.

Release note (backwards-incompatible change): integer and float columns
of less than the max width will now be returned as their own type via
the binary protocol. For example, an int4 column will be returned in 32
bits over the pgwire binary protocol instead of 64 bits.

@jordanlewis jordanlewis requested review from a team, andy-kimball, knz and madelynnblue May 3, 2019 16:14
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@jordanlewis
Copy link
Member Author

Opened lib/pq#857 - adding this to our vendored copy fixes all of the unit tests failures.

@jordanlewis
Copy link
Member Author

This seems good to go -- all tests passing. But, I didn't fix the second point in #36811, about DataConversion.GetFloatPrec. @andy-kimball what motivated that point?

Copy link
Contributor

@andy-kimball andy-kimball left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @andy-kimball, @jordanlewis, and @knz)


pkg/sql/pgwire/types.go, line 91 at r1 (raw file):

// details: https://github.com/cockroachdb/cockroach/issues/36811
//
// TODO(andyk): Remove this once issue #36811 is resolved.

I think you should leave this comment in until you get rid of the entire mapResultOid method.

@jordanlewis jordanlewis changed the title pgwire: return right-sized int and float types [dnm] pgwire: return right-sized int and float types May 7, 2019
With the upgraded type system, we're now in the position to return the
right size of integers to clients that use the binary protocol. Do so.

Release note (backwards-incompatible change): integer and float columns
of less than the max width will now be returned as their own type via
the binary protocol. For example, an int4 column will be returned in 32
bits over the pgwire binary protocol instead of 64 bits.
Copy link
Member Author

@jordanlewis jordanlewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @andy-kimball and @knz)


pkg/sql/pgwire/types.go, line 91 at r1 (raw file):

Previously, andy-kimball (Andy Kimball) wrote…

I think you should leave this comment in until you get rid of the entire mapResultOid method.

Done.

@jordanlewis
Copy link
Member Author

bors r+

craig bot pushed a commit that referenced this pull request Jun 14, 2019
37295: pgwire: return right-sized int and float types r=jordanlewis a=jordanlewis

With the upgraded type system, we're now in the position to return the
right size of integers to clients that use the binary protocol. Do so.

Closes #36811.

Release note (backwards-incompatible change): integer and float columns
of less than the max width will now be returned as their own type via
the binary protocol. For example, an int4 column will be returned in 32
bits over the pgwire binary protocol instead of 64 bits.

Co-authored-by: Jordan Lewis <[email protected]>
@craig
Copy link
Contributor

craig bot commented Jun 14, 2019

Build succeeded

@craig craig bot merged commit 5b3262a into cockroachdb:master Jun 14, 2019
@jordanlewis jordanlewis deleted the type-width branch June 18, 2019 13:56
craig bot pushed a commit that referenced this pull request Jun 18, 2019
38184: sql: fix scrub on tables with mixed case r=jordanlewis a=jordanlewis

There was insufficient quoting in the generated queries to prevent
issues with tables or columns with mixed case. This was causing issues
with the random syntax generator, which tends to produce the query
EXPERIMENTAL SCRUB DATABASE system, since the system database contains
tables with columns with mixed case.

Release note: None

38186: roachtest: update orm blacklists to remove some expected failures r=jordanlewis a=jordanlewis

Upgraded support for int2 and int4 datatypes in #37295 caused us to pass some more tests. This PR updates the blacklists to remove their expected failures.

Closes #37596.
Closes #38179.

38210: changefeedccl: enable abort and split nemeses in TestNemeses r=tbg a=danhhz

These deadlocked when the test was written but seems like they've been
fixed sometime since. \o/

On a gceworker:

    17846 runs so far, 0 failures, over 2h9m40s

Release note: None

Co-authored-by: Jordan Lewis <[email protected]>
Co-authored-by: Daniel Harrison <[email protected]>
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.

sql: Return PG-compatible OID values to clients

4 participants