Developing a C-based UDF
Hi all, I'm developing a C-based user defined function at the moment (actually porting an existing Postgres extension) and I was wondering what kinds of tools I should use for this and how I should actually do the development. At the moment I'm using a simple text editor to edit the relevant files (i.e. the c and mal files) and then completely re-compile MonetDB to test my changes. I'm not entirely happy about this workflow though, so is there an easier way? Perhaps with Visual Studio (I'm on Windows7) ? How do the core developers work on MonetDB? Also, if I run into any problems or have any questions, is this the right mailing list or should I use the developers mailing list? Best regards, Dennis
Hi Dennis,
Just to let you know you don't actually need to recompile the entirety of monetdb to create an extension.
You can place the shared library file containing your compiled udf into the directory containing the other monetdb modules (location dependent on platform ) along with an appropriate mal file and autoload entry.
I am on holiday at the minute but I did exactly this very recently for monetdb on ubuntu and can provide you with more details next week if you want.
Best regards,
Alastair
On 17 Jul 2014 15:30, Dennis Pallett
I bumped on the exact same problem some time ago. Out of curiosity, what are you porting? I implemented HyperLogLog aggregation a bit before the Postgres version came out; this was some time ago but I still remember the details. Like Alastair said, you just need to make && make install on the relevant UDF directory; no need to recompile all of Monet. The code for the UDF is loaded through a shared library. On 07/17/2014 03:39 PM, Alastair McKinley wrote:
Hi Dennis,
Just to let you know you don't actually need to recompile the entirety of monetdb to create an extension.
You can place the shared library file containing your compiled udf into the directory containing the other monetdb modules (location dependent on platform ) along with an appropriate mal file and autoload entry.
I am on holiday at the minute but I did exactly this very recently for monetdb on ubuntu and can provide you with more details next week if you want.
Best regards,
Alastair
On 17 Jul 2014 15:30, Dennis Pallett
wrote: Hi all, I'm developing a C-based user defined function at the moment (actually porting an existing Postgres extension) and I was wondering what kinds of tools I should use for this and how I should actually do the development.
At the moment I'm using a simple text editor to edit the relevant files (i.e. the c and mal files) and then completely re-compile MonetDB to test my changes. I'm not entirely happy about this workflow though, so is there an easier way? Perhaps with Visual Studio (I'm on Windows7) ? How do the core developers work on MonetDB?
Also, if I run into any problems or have any questions, is this the right mailing list or should I use the developers mailing list?
Best regards, Dennis _______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list
Hi Alastair & Miguel, Thank you for your replies. Only compiling the UDF works perfectly, so thank you for the instructions. I'm porting a Postgres extension that was developed as part of research done into optimizing aggregation operations (count, sum, min, max) at the University of Twente (http://utwente.nl/en/). Currently we have several fully working prototypes of the research running on Postgres but we also want to have the same prototypes running on MonetDB (and we expect/hope that it is actually much faster with MonetDB!). Best regards, Dennis On 18-7-2014 11:44, Miguel Ping wrote:
I bumped on the exact same problem some time ago. Out of curiosity, what are you porting? I implemented HyperLogLog aggregation a bit before the Postgres version came out; this was some time ago but I still remember the details.
Like Alastair said, you just need to make && make install on the relevant UDF directory; no need to recompile all of Monet. The code for the UDF is loaded through a shared library.
On 07/17/2014 03:39 PM, Alastair McKinley wrote:
Hi Dennis,
Just to let you know you don't actually need to recompile the entirety of monetdb to create an extension.
You can place the shared library file containing your compiled udf into the directory containing the other monetdb modules (location dependent on platform ) along with an appropriate mal file and autoload entry.
I am on holiday at the minute but I did exactly this very recently for monetdb on ubuntu and can provide you with more details next week if you want.
Best regards,
Alastair
On 17 Jul 2014 15:30, Dennis Pallett
wrote: Hi all, I'm developing a C-based user defined function at the moment (actually porting an existing Postgres extension) and I was wondering what kinds of tools I should use for this and how I should actually do the development.
At the moment I'm using a simple text editor to edit the relevant files (i.e. the c and mal files) and then completely re-compile MonetDB to test my changes. I'm not entirely happy about this workflow though, so is there an easier way? Perhaps with Visual Studio (I'm on Windows7) ? How do the core developers work on MonetDB?
Also, if I run into any problems or have any questions, is this the right mailing list or should I use the developers mailing list?
Best regards, Dennis _______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list
_______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list
participants (3)
-
Alastair McKinley
-
Dennis Pallett
-
Miguel Ping