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

Too many functions are written in PL/pgsql #1

Open
davidfetter opened this issue Feb 2, 2019 · 5 comments
Open

Too many functions are written in PL/pgsql #1

davidfetter opened this issue Feb 2, 2019 · 5 comments

Comments

@davidfetter
Copy link

A lot of them could be SQL, which can much more easily be inlined, and is easier to comprehend.

Would you be interested in a patch to do this refactoring?

@leondutoit
Copy link
Owner

Hi @davidfetter thanks for taking interest. Can you explain the inlining part? Is this a performance gain?

@davidfetter
Copy link
Author

Partly performance, partly clarity of the code.

@leondutoit
Copy link
Owner

And apart from clarity of code, from your perspective, is there any significant performance gain in general? Any documentation about this? Do you plan on using this code?

@davidfetter
Copy link
Author

In general, the gain I see is more in clarity than in performance, but there are some easy performance wins to be had, some by refactoring to be more declarative.

@leondutoit
Copy link
Owner

Right. This is a bit of a pet project, but I also intend to use it in production soon, so I'd like the API to be stable (although I was planning on returning json from most functions instead of text, since my primary use case is usage via a REST API). But given that, it would be great if you were willing to submit a patch. I'm sure I'll learn something in the process.

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

No branches or pull requests

2 participants