Comments on: PostgreSQL: Simple C extension Development for a Novice User (and Performance Advantages) https://www.percona.com/blog/postgresql-simple-c-extension-development-for-a-novice-user/ Tue, 13 Feb 2024 17:05:04 +0000 hourly 1 https://wordpress.org/?v=6.5.2 By: Curtis https://www.percona.com/blog/postgresql-simple-c-extension-development-for-a-novice-user/#comment-10972842 Thu, 19 Nov 2020 18:53:19 +0000 https://www.percona.com/blog/?p=59025#comment-10972842 your comment mention create folder but does mention in what folder.

]]>
By: Chris https://www.percona.com/blog/postgresql-simple-c-extension-development-for-a-novice-user/#comment-10971446 Sun, 17 Nov 2019 01:14:47 +0000 https://www.percona.com/blog/?p=59025#comment-10971446 Some questions: Do you use an IDE for build and debug? Which one? Also, how do you debug a function that is getting called from Postgres?

]]>
By: Jobin Augustine https://www.percona.com/blog/postgresql-simple-c-extension-development-for-a-novice-user/#comment-10971088 Thu, 08 Aug 2019 08:11:39 +0000 https://www.percona.com/blog/?p=59025#comment-10971088 Yes Agree. Thank you for your feedback

]]>
By: Tsingson Qin https://www.percona.com/blog/postgresql-simple-c-extension-development-for-a-novice-user/#comment-10971087 Thu, 08 Aug 2019 06:21:46 +0000 https://www.percona.com/blog/?p=59025#comment-10971087 cool.

sometime we need C extension for special function/logic that use in plpgsql.

]]>
By: Jobin Augustine https://www.percona.com/blog/postgresql-simple-c-extension-development-for-a-novice-user/#comment-10971086 Wed, 07 Aug 2019 11:50:38 +0000 https://www.percona.com/blog/?p=59025#comment-10971086 I agree with you. PLpgSQL as a gluing language has much more scope. Just execution speed many not be a good comparison aswell. Other factors like speed of development and debugging, protection from memory leaks etc are more important from organizations.
In this post, I was trying to address completely novice user who never tried anything on C extension side.
Thank you for great feedback and I shall try to enhance that in upcoming posts.

]]>
By: okbobcz https://www.percona.com/blog/postgresql-simple-c-extension-development-for-a-novice-user/#comment-10971072 Sun, 04 Aug 2019 11:03:45 +0000 https://www.percona.com/blog/?p=59025#comment-10971072 PLpgSQL is designed to be glue for SQL queries – when it is used, then it is pretty fast. Your example is typical worst case and good example when don’t use plpgsql. SQL function is fast due inlining – and when inlining is possible, then it is good case for it.

Your C example can be enhanced to use buildin function for sum of two integers instead C operator. For example, the overflow is not tested and solved in your C function.

]]>