by Dickson S. Guedes
Do you ever have problems with copy and paste? I often did, and that is why I create custom templates for often used files that match certain patterns.
With files from the structure of PostgreSQL’s extensions was the same thing.
I was tired of creating the files and edit the META, controlfile, READMEs, etc. every time I start a new extension and felt that I need something that made me more productive, so I decided to create an automatic generator and share it with the world.
I called it pgxn-utils, and you should give it a try: it is easy to install, easy to use and will help you to start hacking quickly!
First install it:
gem install pgxn_utils
Then start a new extension:
pgxn_utils skeleton my_cool_extension
Thats all! It will create the initial skeleton for you and you can start coding! But, if you don’t want to install it, see it in action
I updated the howto yesterday. This document explains how to create a PGXN distribution. If you’re interested in releasing PostgreSQL extensions on PGXN, this document is worth a read.
In essence, it’s really simple: Just create a
META.json and upload. But to get the full benefit, there are quite a few other recommendations. Already familiar with it? Here’s the checklist:
- Create a
- Create a control file
- Create a
- Implement the code in the
- Write tests in the
- Write a Text::Markup-recognizable
- Write Text::Markup-recognizable documentation in the
- Consider including other files:
- Release it!
Be sure to read the howto for details. Got feedback or suggestions? Leave a comment!
Oh, and check out pgxn-utils and simplify your extension-development life.