sql-info.de

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
    1,14,ACADEMY ACADEMY,PENELOPE GUINESS,25.99,0,1976
    2,6,ACADEMY ACE,EWAN RICKMAN,20.99,0,6289
    3,6,ACADEMY ADAPTATION,VIVIEN KAHN,28.99,0,7173
    4,3,ACADEMY AFFAIR,ALAN MARX,14.99,0,8042
    5,3,ACADEMY AFRICAN,CARRIE HANNAH,11.99,1,2183
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 10:28 AM

Some notes on getting Firebird 2.5 up and running on openSUSE.

Installation

Firebird 2.5 is can be installed easily from YaST2; I selected the SuperServer package.

Firebird is not started by default; service firebird start will take care of that.

Add Firebird as a system startup item ether via YaST > System > System Services (Runlevel), or via the command line (as root) with insserv firebird.

isql (command line client)

The isql client is installed as isql-fb.

The sample employee.fdb database is located in /usr/lib64/firebird/sample/.

Posted at 1:53 AM

When trying to compile DBD-Firebird on openSUSE 12.2, following error occurs even though the appropriate -devel packages are installed:

cc -c  -I"/usr/include" -I"/usr/lib/perl5/vendor_perl/5.16.0/x86_64-linux-thread-multi/auto/DBI" -D_REENTRANT -D_GNU_SOURCE -DPERL_USE_SAFE_PUTENV -fno-strict-aliasing -pipe -fstack-protector -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -Wall -pipe   -DVERSION=\"1.11\" -DXS_VERSION=\"1.11\" -fPIC "-I/usr/lib/perl5/5.16.0/x86_64-linux-thread-multi/CORE"  -DEMBEDDED FirebirdEmbedded.c
In file included from FirebirdEmbedded.h:18:0,
                 from FirebirdEmbedded.xs:20:
dbdimp.h:80:23: fatal error: ibase.h: No such file or directory
compilation terminated.

Setting:

export C_INCLUDE_PATH=/usr/include/firebird

will ensure the correct include path for ibase.h is found.

Posted at 11:37 PM