◐ Shell
clean mode source ↗

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

Skip to content

Navigation Menu

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Conversation

mrigger

mrigger


PostgresColumn column = columns.get(i);

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

Choose a reason for hiding this comment

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

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

Choose a reason for hiding this comment

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

yep!

mrigger

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

Choose a reason for hiding this comment

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

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?

2 participants

@yaojiejia @mrigger