-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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: identity information under information_schema.columns is inconsistent with postgres #82064
Comments
Hello, I am Blathers. I am here to help you get the issue triaged. Hoot - a bug! Though bugs are the bane of my existence, rest assured the wretched thing will get the best of care here. I was unable to automatically find someone to ping. If we have not gotten back to your issue within a few business days, you can try the following:
🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan. |
looks like we have a TODO about this: cockroach/pkg/sql/information_schema.go Lines 519 to 525 in b6f42c2
|
To solve this we may need to solve #83208 first. I'll open a PR for it. |
…schema Previously, for a column created with the `GENERATED ... AS IDENTITY (seq_options)` syntax, the info for the sequence option is not saved in the information schema. This commit is to fix it. We parse the sequence options saved as a string in the descriptor, so that it's much easier to extract specific option such as sequence's start value or increment size. To make sure that we get the same sequence option to generate the sequence, we reuse `assignSequenceOptions()` by breaking it into several helper functions. fixes cockroachdb#82064 Release note (sql): add sequence option info for identity columns under information_schema
…schema Previously, for a column created with the `GENERATED ... AS IDENTITY (seq_options)` syntax, the info for the sequence option is not saved in the information schema. This commit is to fix it. We parse the sequence options saved as a string in the descriptor, so that it's much easier to extract specific option such as sequence's start value or increment size. To make sure that we get the same sequence option to generate the sequence, we reuse `assignSequenceOptions()` by breaking it into several helper functions. fixes cockroachdb#82064 Release note (sql): add sequence option info for identity columns under information_schema
…schema Previously, for a column created with the `GENERATED ... AS IDENTITY (seq_options)` syntax, the info for the sequence option is not saved in the information schema. This commit is to fix it. We parse the sequence options saved as a string in the descriptor, so that it's much easier to extract specific option such as sequence's start value or increment size. To make sure that we get the same sequence option to generate the sequence, we reuse `assignSequenceOptions()` by breaking it into several helper functions. fixes cockroachdb#82064 Release note (sql): add sequence option info for identity columns under information_schema
84034: sql: add sequence option info for identity columns under information_schema r=rafiss a=ZhouXing19 Previously, for a column created with the `GENERATED ... AS IDENTITY (seq_options)` syntax, the info for the sequence option is not saved in the information schema. This commit is to fix it. We parse the sequence options saved as a string in the the descriptor, so that it's much easier to extract specific options such as sequence's start value or increment size. To make sure that we get the same sequence option to generate the sequence, we reuse `assignSequenceOptions()` by breaking it into several helper functions. fixes #82064 fixes #83208 Release note (sql): add sequence option info for identity columns under information_schema 84389: sql: fix auto-retries for upgraded transactions r=ZhouXing19 a=rafiss This is implemented by adding more state to the conn executor state machine. Now, it tracks if the open transaction was upgraded from an implicit to an explicit txn. If so, when doing an auto retry, the transaction is marked as an implicit again, so that the statements in the transaction can upgrade it to explicit. No release note is needed for v22.2, but we should use the following note when backporting to v22.1. Placeholder note (bug fix): Fixed a bug where some statements in a batch would not get executed if the following conditions were met: - A batch of statements is sent in a single string. - A BEGIN statement appears in the middle of the batch. - The enable_implicit_transaction_for_batch_statements session variable is set to true. (This defaults to false in v22.1.x) This bug was introduced in v22.1.2. (#82681) Release note: None 84575: sql/schemachanger/sctest: don't rewrite if not enabled r=ajwerner a=ajwerner This commit changes the explain diagram testing to check the output as opposed to unconditionally rewriting. Before this change, the bazel build was broken because the sandbox was not writable. Also, we weren't actually testing anything. Release note: None Co-authored-by: Jane Xing <zhouxing@uchicago.edu> Co-authored-by: Rafi Shamim <rafi@cockroachlabs.com> Co-authored-by: Andrew Werner <awerner32@gmail.com>
Describe the problem
The table
information_schema.columns
should reflect the information about an identity column and the underlying sequence information.To Reproduce
cockroach:
postgres:
Expected behavior
The above select statement should return the information about the sequence
Environment:
Jira issue: CRDB-16195
Epic CRDB-14049
The text was updated successfully, but these errors were encountered: