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: verify pg error codes in logic tests #107369

Open
rharding6373 opened this issue Jul 21, 2023 · 0 comments
Open

sql: verify pg error codes in logic tests #107369

rharding6373 opened this issue Jul 21, 2023 · 0 comments
Labels
C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) quality-friday A good issue to work on on Quality Friday T-sql-queries SQL Queries Team

Comments

@rharding6373
Copy link
Collaborator

rharding6373 commented Jul 21, 2023

As discussed in https://cockroachlabs.slack.com/archives/CV581CE78/p1689604706468729, we should add pg error codes to all logic tests that expect an error and make a best effort to verify that they match what is expected in postgres.

Jira issue: CRDB-30011

@rharding6373 rharding6373 added the C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) label Jul 21, 2023
@blathers-crl blathers-crl bot added the T-sql-queries SQL Queries Team label Jul 21, 2023
rharding6373 added a commit to rharding6373/cockroach that referenced this issue Jul 21, 2023
Used postgres where possible to generate the error codes. A few
questionable codes have been marked with TODOs to be addressed in future
work.

Epic: none
Informs: cockroachdb#107369

Release note: none
rharding6373 added a commit to rharding6373/cockroach that referenced this issue Jul 21, 2023
Used postgres where possible to generate the error codes. A few
questionable codes have been marked with TODOs to be addressed in future
work.

Epic: none
Informs: cockroachdb#107369

Release note: none
@mgartner mgartner moved this to Triage in SQL Queries Jul 24, 2023
@DrewKimball DrewKimball added the quality-friday A good issue to work on on Quality Friday label Aug 1, 2023
@DrewKimball DrewKimball moved this from Triage to New Backlog in SQL Queries Aug 1, 2023
rharding6373 added a commit to rharding6373/cockroach that referenced this issue Aug 7, 2023
This commit fixes some incorrect error codes and error messages in UDF
logic tests that were uncovered as part of auditing pg error codes
against postgres. In some cases where there were discrepancies between
postgres and CRDB that were due to implementation differences or
improved behavior, we left a comment above the test detailing why there
is a difference between postgres and CRDB behavior.

Epic: None
Informs: cockroachdb#107369

Release note: None
craig bot pushed a commit that referenced this issue Aug 7, 2023
108224: sql: fix some error codes and messages for udfs r=rharding6373 a=rharding6373

This commit fixes some incorrect error codes and error messages in UDF logic tests that were uncovered as part of auditing pg error codes against postgres. In some cases where there were discrepancies between postgres and CRDB that were due to implementation differences or improved behavior, we left a comment above the test detailing why there is a difference between postgres and CRDB behavior.

Epic: None
Informs: #107369

Release note: None

Co-authored-by: rharding6373 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) quality-friday A good issue to work on on Quality Friday T-sql-queries SQL Queries Team
Projects
Status: Backlog
Development

No branches or pull requests

2 participants