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

simplify nested condition #1206

Closed
wants to merge 5 commits into from
Closed

simplify nested condition #1206

wants to merge 5 commits into from

Conversation

cmucheru
Copy link

@cmucheru cmucheru commented Sep 1, 2023

Simplify nested function for readability

@github-actions github-actions bot added the PG12 PostgreSQL12 label Sep 1, 2023
@@ -178,24 +177,19 @@ static void object_access(ObjectAccessType access, Oid class_id, Oid object_id,
* The above applies to DROP TABLE command too.
*/

if (drop_arg->dropflags & PERFORM_DELETION_INTERNAL)
Copy link
Member

Choose a reason for hiding this comment

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

Does this change break for the case class_id == RelationRelationId?

Copy link
Author

Choose a reason for hiding this comment

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

No. It does not break.

Copy link
Member

@rafsun42 rafsun42 Sep 18, 2023

Choose a reason for hiding this comment

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

@cmucheru
Could you elaborate more? In this case, the function calls delete_label first before returning. But with your change, it returns without calling that function. Does it have side effect?

Copy link
Author

@cmucheru cmucheru Sep 24, 2023

Choose a reason for hiding this comment

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

@rafsun42 PERFOM_DELETION_INTERNAL is evaluated separately before checking the namespaces and relations. If it is set, the delete_label is not called.

@rafsun42
Copy link
Member

rafsun42 commented Sep 5, 2023

Why are the files in bc extension?

@rafsun42 rafsun42 self-assigned this Sep 5, 2023
@jrgemignani
Copy link
Contributor

Why so many modified files?

@rafsun42
Copy link
Member

@cmucheru The tests are failing at catalog.sql.

@cmucheru
Copy link
Author

@rafsun42 thankyou. I am unfamiliar with the tests. I will like to check my code again to pass the tests in catalog.sql .

Copy link

This PR is stale because it has been open 45 days with no activity. Remove "Abondoned" label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale Stale issues/PRs label May 11, 2024
Copy link

This PR was closed because it has been stalled for further 7 days with no activity

@github-actions github-actions bot closed this May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PG12 PostgreSQL12 Stale Stale issues/PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants