Read Blogs
Technical Blog
This post continues from my report on Random Numbers. I have begun working on a random data generator so I want to run some tests to see whether different random number generators actually impact the overall performance of a data generator. Let’s say we want to create random data for a table with 17 columns, something that contains the details of a company’s order information: Order ID Line number...
Technical Blog
He estado trabajando gradualmente en el desarrollo desde cero de herramientas para probar el rendimiento de los sistemas de bases de datos de código abierto. Uno de los componentes de este kit de herramientas es un generador de datos capaz de crear conjuntos que serán cargados en una base de datos. Necesitaré un generador de números aleatorios que cuente con las siguientes características...
Technical Blog
I’ve been slowly working on developing open source database systems performance testing tools from scratch. One of the components of this toolset is a data generator that can build a dataset to be loaded into a database. I’ll need a random number generator for that and these are the requirements that I think are most important: reproducible data fast Being able to recreate the same data can be...
Technical Blog
This example will just be focusing on returning data from user defined functions, specifically returning a value as opposed to using OUT parameters. The full code is on Github. To quickly review, PL/Julia calls jl_eval_string() to execute Julia code and captures the returning jl_value_t data structure, which contains the result of the Julia code executed. The result needs to be extracted from the...
Technical Blog
One method to handle input parameters with PL/Julia is to rewrite the body of the user defined function or stored procedure on the fly with the values declared as global variables. In order to do that, we need to create a new buffer big enough to hold the new global variable declarations in addition to the original body of the function or procedure. Again, I’ll omit various error checks to keep...
Technical Blog
A PostgreSQL procedural language handler needs to look up the body of the user defined function or stored procedure for the code to execute. Remember that the C function executed to handle PL/Julia user defined functions and stored procedures is defined in the SQL file. Thus the pljulia_call_handler() function needs to be updated to retrieve the body of the respective function or procedure. The...
Technical Blog
Julia provides an API so that Julia functions can be called from C. PL/Julia will use this C API to execute Julia code from its user defined functions and stored procedures. Julia’s documentation provides an example C program that starts up the Julia environment, evaluates the expression sqrt(2.0), displays the resulting value to the standard output, and cleans up the Julia environment. We will...
Technical Blog
PostgreSQL supports many procedural languages, which can be used to write user defined functions or stored procedures. There are four that are readily available as part of the standard PostgreSQL distribution: PL/pgSQL, PL/Tcl, PL/Perl, PL/Python. Yet procedural languages don’t have to be created as part of the core project. There are a number more that are available as a result of PostgreSQL...
Technical Blog
This is a story about how I found myself trying programming languages. I’ve been running an OLTP type database test ( DBT-2, if you’ve heard of it), and noticed the post-processing reporting scripts for analyzing the database test results were running longer than I thought they would. I was running tests on 16 systems at the same time and one particular script was taking just over 60 seconds to...
Technical Blog
PostgreSQL was presented with the 2019 O’Reilly Open Source Award for Lifetime Achievement in Portland, Oregon, Thursday July 18th during OSCON. I had the honor of accepting that award alongside Bruce Momjian and Christophe Pettus. Starting last year in 2018, these awards were presented to projects and the first Lifetime Achievement award was given to Linux. It’s quite a distinction to be...