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

Refactoring #46

Merged
merged 3 commits into from
Mar 6, 2025
Merged

Refactoring #46

merged 3 commits into from
Mar 6, 2025

Conversation

artemgavrilov
Copy link
Collaborator

@artemgavrilov artemgavrilov commented Mar 5, 2025

Description

Refactoring that addresses:

  1. Reduce variables scope
  2. Use more safe strlcpy instead of unsafe strncpy
  3. Make query string constant
  4. Use palloc_object where possible
  5. Removes redundant error code check on SPI_connect https://www.postgresql.org/docs/devel/spi-spi-connect.html

Links

@artemgavrilov artemgavrilov marked this pull request as ready for review March 5, 2025 15:24
@artemgavrilov artemgavrilov requested a review from jeltz March 5, 2025 15:24
Copy link

@darkfronza darkfronza left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

@jeltz jeltz left a comment

Choose a reason for hiding this comment

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

Looks good! Nice changes. :)

@artemgavrilov artemgavrilov merged commit 0da4ec5 into main Mar 6, 2025
15 checks passed
@artemgavrilov artemgavrilov deleted the refactoring branch March 6, 2025 13:37
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.

3 participants