1 | 2 | Index

October 17, 2020

Firebird Blog | libfq 0.4.2 released

libfq 0.4.2 has been released with following changes:

  • configure option --with-fbclient added
  • output of FQexplainStatement() fixed

This is a maintenance release which does not introduce any new features.

Source code is available at the libfq GitHub page.

RPM packages are available via the libfq copr repository.

Online libfq documentation is available here: https://libfq.sql-info.de/.

Posted at 2:37 AM

The long-awaited Firebird 4 release is drawing closer, so I thought it would be a nice idea to check it out and verify that it works with firebird_fdw (and possibly add support for new features). As part of that I thought I'd try and build Firebird from source, something I've never done before. The aim is to be able to build and start an ad-hoc instance running under my local system user on a custom port, to prevent any kind ofconflict with the existing Firebird 3.x installation, installed from standard packages.

With PostgreSQL this is fairly straightforward:

./configure --prefix=/home/wherever/builds/postgresql-13
make -s -j 4 && make install

then execute initdb, modify the configuration to use a non-default port and and start it up with pg_ctl.

With Firebird the process is somewhat less straightforward. The basic source installation process is documented here:

but this assumes an install on a system where another Firebird version is not already installed and running.

In particular, the normal "./configure && make install" process will end up launching an interactive install script, which refuses to run if it detects a running Firebird instance, and requires root permission to perform the install.

After some false starts and some assistance from the firebird-devel list I was able to get a purely local install running, with the following steps:

Posted at 8:57 AM

After upgrading to OX X 10.11 "El Capitan", attempting to connect to Firebird - which had always started on boot - failed with the message:

Statement failed, SQLSTATE = 08006
Unable to complete network request to host "localhost".
-Failed to establish a connection.

This is evidently to do with OS X StartupItems being deprecated for starting daemons; this blog provides a solution.

Posted at 11:23 PM

Let's assume you have a CSV file which looks like this:

    $ head -5 /tmp/prod.csv
    2,6,ACADEMY ACE,EWAN RICKMAN,20.99,0,6289
    4,3,ACADEMY AFFAIR,ALAN MARX,14.99,0,8042
Posted at 3:34 PM

Well I've finally fulfilled one of my 2013 New Year's resolutions, which was to write some kind of foreign data wrapper, so with no further ado here is the initial implementation. It is basically working but is still very much in the proof-of-concept/unstable/may-eat-your-data stage. Having said that, if anyone has a practical use for this I'd be very interested to hear about it - my main motivation for creating this FDW is to learn more about PostgreSQL internals.

Posted at 8:28 AM

1 | 2 | Index