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

Add column descriptions for INFORMATION_SCHEMA.PARTITIONS #17533

Open
mjonss opened this issue May 19, 2024 · 3 comments
Open

Add column descriptions for INFORMATION_SCHEMA.PARTITIONS #17533

mjonss opened this issue May 19, 2024 · 3 comments

Comments

@mjonss
Copy link
Contributor

mjonss commented May 19, 2024

Change Request

Please answer the following questions before submitting your issue. Thanks!

  1. Describe what you find is inappropriate or missing in the existing docs.
    https://docs.pingcap.com/tidb/stable/information-schema-partitions only shows the table and its columns, not what the columns mean.

  2. Describe your suggestion or addition.
    For each column describe the content, I was recently asked for how to get the partition limits/values for RANGE partitioning :) Which is in PARTITION_DESCRIPTION
    Similar to how https://docs.pingcap.com/tidb/stable/information-schema-columns is documented

  3. Provide some reference materials (such as documents and websites) if you could.
    https://dev.mysql.com/doc/refman/8.0/en/information-schema-partitions-table.html

@Oreoxmt
Copy link
Collaborator

Oreoxmt commented May 20, 2024

docs.pingcap.com/tidb/stable/information-schema-columns only shows the table and its columns, not what the columns mean.

@mjonss It seems that the description of columns in the COLUMNS table is already documented in https://docs.pingcap.com/tidb/stable/information-schema-columns.

The description of columns in the `COLUMNS` table is as follows:
* `TABLE_CATALOG`: The name of the catalog to which the table with the column belongs. The value is always `def`.
* `TABLE_SCHEMA`: The name of the schema in which the table with the column is located.
* `TABLE_NAME`: The name of the table with the column.
* `COLUMN_NAME`: The name of the column.
* `ORDINAL_POSITION`: The position of the column in the table.
* `COLUMN_DEFAULT`: The default value of the column. If the explicit default value is `NULL`, or if the column definition does not include the `default` clause, this value is `NULL`.
* `IS_NULLABLE`: Whether the column is nullable. If the column can store null values, this value is `YES`; otherwise, it is `NO`.
* `DATA_TYPE`: The type of data in the column.
* `CHARACTER_MAXIMUM_LENGTH`: For string columns, the maximum length in characters.
* `CHARACTER_OCTET_LENGTH`: For string columns, the maximum length in bytes.
* `NUMERIC_PRECISION`: The numeric precision of a number-type column.
* `NUMERIC_SCALE`: The numeric scale of a number-type column.
* `DATETIME_PRECISION`: For time-type columns, the fractional seconds precision.
* `CHARACTER_SET_NAME`: The name of the character set of a string column.
* `COLLATION_NAME`: The name of the collation of a string column.
* `COLUMN_TYPE`: The column type.
* `COLUMN_KEY`: Whether this column is indexed. This field might have the following values:
* Empty: This column is not indexed, or this column is indexed and is the second column in a multi-column non-unique index.
* `PRI`: This column is the primary key or one of multiple primary keys.
* `UNI`: This column is the first column of the unique index.
* `MUL`: The column is the first column of a non-unique index, in which a given value is allowed to occur for multiple times.
* `EXTRA`: Any additional information of the given column.
* `PRIVILEGES`: The privilege that the current user has on this column. Currently, this value is fixed in TiDB, and is always `select,insert,update,references`.
* `COLUMN_COMMENT`: Comments contained in the column definition.
* `GENERATION_EXPRESSION`: For generated columns, this value displays the expression used to calculate the column value. For non-generated columns, the value is empty.

Does this issue suggest a need to include similar descriptions for columns in https://docs.pingcap.com/tidb/stable/information-schema-partitions?

@mjonss
Copy link
Contributor Author

mjonss commented May 20, 2024

@mjonss It seems that the description of columns in the COLUMNS table is already documented in https://docs.pingcap.com/tidb/stable/information-schema-columns.
...
Does this issue suggest a need to include similar descriptions for columns in https://docs.pingcap.com/tidb/stable/information-schema-partitions?

@Oreoxmt yes, sorry for the confusion and wrong link. I have updated the description.

@Oreoxmt
Copy link
Collaborator

Oreoxmt commented May 21, 2024

@lcwangchao Could you please take a look at this issue and create a doc PR to add it?

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

No branches or pull requests

2 participants