FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add Support for Merge Generator in Postgres v15 by yaojiejia · Pull Request #1255 · sqlancer/sqlancer · GitHub

Add Support for Merge Generator in Postgres v15 - #1255

Open
yaojiejia wants to merge 3 commits into
sqlancer:mainfrom
yaojiejia:psql_v15_merge
Open

Add Support for Merge Generator in Postgres v15#1255
yaojiejia wants to merge 3 commits into
sqlancer:mainfrom
yaojiejia:psql_v15_merge

Conversation

Copy link
Copy Markdown
Contributor

Closes #1254


PostgresColumn column = columns.get(i);

if (Randomly.getBoolean() && sourceHasColumn(column, sourceTable)) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

There are a couple of repeated code patterns here. It would be great to factor them out to methods.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

yep!

} else {
sb.append(generateUpdateSet(targetTable, sourceTable));
}
} catch (Exception e) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This looks a bit surprising. Why does throwing an exception affect the logic of what we generate here? Can we achieve the intended outcome without relying on exceptions?

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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

Successfully merging this pull request may close these issues.

PostgreSQL Version 15 Upgrade - Supporting MERGE Function

2 participants


Back | FazBrowse Home | New Git URL