Home > PostgreSQL > Compile Pltoolbox on PostgreSQL 9.3.0

Compile Pltoolbox on PostgreSQL 9.3.0

For me, pltoolbox is a great extension by Pavel Stehule. I have downloaded and built it on PostgreSQL 9.3.0 and come out with warnings:

warning: implicit declaration of function ‘HeapTupleHeaderGetTypeId’
warning: implicit declaration of function ‘HeapTupleHeaderGetTypMod’
warning: implicit declaration of function ‘HeapTupleHeaderGetDatumLength’

If I just simply ignore those warnings then SQL installation failed:

psql -f pltoolbox.sql -U postgres -h localhost -p 5432 -d targetdb
ERROR: could not load library “/opt/pgsql/9.3.0/lib/pltoolbox.so”: /opt/pgsql/9.3.0/lib/pltoolbox.so: undefined symbol: HeapTupleHeaderGetTypeId

The fix is just simply put include statement in “record.c”:

#include “access/htup_details.h”

After then, the package building and installation went smoothly.

About these ads
Categories: PostgreSQL
  1. sig
    December 17, 2013 at 2:12 pm | #1

    Simple but very useful. Thanks and keep writing

  2. December 28, 2013 at 7:24 am | #2

    I fixed these warnings in 1.0.3 release

  1. December 25, 2013 at 5:39 pm | #1

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: