Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sql: implement pg_catalog.pg_attribute.atttypmod #37230

Merged
merged 1 commit into from May 1, 2019

Conversation

Projects
None yet
3 participants
@jordanlewis
Copy link
Member

commented May 1, 2019

This field contains information about the scale, precision and/or width
of various datatypes and is important for client compatibility.

Fixes #16032.

Release note (sql change): the atttypmod column of the pg_attribute
catalog table is supported.

@jordanlewis jordanlewis requested a review from mjibson May 1, 2019

@jordanlewis jordanlewis requested review from cockroachdb/sql-execution-prs as code owners May 1, 2019

@cockroach-teamcity

This comment has been minimized.

Copy link
Member

commented May 1, 2019

This change is Reviewable

Show resolved Hide resolved pkg/sql/pg_catalog.go Outdated
Show resolved Hide resolved pkg/sql/pg_catalog.go Outdated
attTypMod := -1
width := int(colTyp.Width())
if width != 0 {
switch colTyp.Family() {

This comment has been minimized.

Copy link
@mjibson

mjibson May 1, 2019

Member

should we add a default: panic or something here to make sure we don't miss other types that can have a width?

This comment has been minimized.

Copy link
@jordanlewis

jordanlewis May 1, 2019

Author Member

I don't think so - these are exactly the set of types that need this logic, based on my investigations.

sql: implement pg_catalog.pg_attribute.atttypmod
This field contains information about the scale, precision and/or width
of various datatypes and is important for client compatibility.

Release note (sql change): the atttypmod column of the pg_attribute
catalog table is supported.

@jordanlewis jordanlewis force-pushed the jordanlewis:fix-atttypmod branch from d6864d6 to 71155e4 May 1, 2019

@jordanlewis

This comment has been minimized.

Copy link
Member Author

commented May 1, 2019

RFAL!

@mjibson

mjibson approved these changes May 1, 2019

@jordanlewis

This comment has been minimized.

Copy link
Member Author

commented May 1, 2019

bors r+

TFTR

craig bot pushed a commit that referenced this pull request May 1, 2019

Merge #37230
37230: sql: implement pg_catalog.pg_attribute.atttypmod r=jordanlewis a=jordanlewis

This field contains information about the scale, precision and/or width
of various datatypes and is important for client compatibility.

Fixes #16032.

Release note (sql change): the atttypmod column of the pg_attribute
catalog table is supported.

Co-authored-by: Jordan Lewis <jordanthelewis@gmail.com>
@craig

This comment has been minimized.

Copy link

commented May 1, 2019

Build succeeded

@craig craig bot merged commit 71155e4 into cockroachdb:master May 1, 2019

3 checks passed

GitHub CI (Cockroach) TeamCity build finished
Details
bors Build succeeded
Details
license/cla Contributor License Agreement is signed.
Details

@jordanlewis jordanlewis deleted the jordanlewis:fix-atttypmod branch May 8, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.