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: Add default_int_size to control INT alias #32848

Merged
merged 1 commit into from
Dec 12, 2018
Merged

sql: Add default_int_size to control INT alias #32848

merged 1 commit into from
Dec 12, 2018

Commits on Dec 12, 2018

  1. sql: Add default_int_size to control INT and SERIAL aliases.

    This is a follow-up from #32831 to support #26925.
    
    The combination of `default_int_size` interacts with
    `experimental_serial_normalization`. Sequence types that are ultimately based
    on `unique_rowid()` must always be INT8 types in order to hold the returned
    values.  Only in the case where `default_int_size=4
    experimental_serial_normalization='sql_sequence'` will an INT4 column be
    created in response to a SERIAL type.
    
    Release note (sql change): A new session variable `default_int_size` and
    cluster setting `sql.defaults.default_int_size` have been added to control how
    the INT and SERIAL types are interpreted. The default value, 8, causes the INT
    and SERIAL types to be interpreted as aliases for INT8 and SERIAL8, which have
    been the historical defaults for CockroachDB.  PostgreSQL clients that expect
    INT and SERIAL to be 32-bit values, can set `default_int_size` to 4, which will
    cause INT and SERIAL to be aliases for INT4 and SERIAL4.  Please note that due
    to issue #32846, `SET default_int_size` does not take effect until the next
    statement batch is executed.
    bobvawter committed Dec 12, 2018
    Configuration menu
    Copy the full SHA
    1fa9e4b View commit details
    Browse the repository at this point in the history