Jon Ernster writes:
Having problems compiling DBD::Pg on a RHEL 5.5 machine running Perl 5.8.8
running Greenplum which is based on PostgreSQL 8.2.15. [...]
dbdimp.c:55: error: conflicting types for ‘lo_import_with_oid’

/usr/local/GP- error: previous declaration
of ‘lo_import_with_oid’ was here

dbdimp.c:56: error: conflicting types for ‘lo_import_with_oid’

/usr/local/GP- error: previous declaration
of ‘lo_import_with_oid’ was here
That's caused by the following dbdimp.c section:

#if PGLIBVERSION < 80400

Oid lo_import_with_oid (PGconn *conn, char *filename, unsigned int lobjId);
Oid lo_import_with_oid (PGconn *conn, char *filename, unsigned int lobjId) {
         croak ("Cannot use lo_import_with_oid unless compiled against Postgres 8.4 or later");


According to


the correct prototype is

Oid lo_import_with_oid(PGconn *conn, const char *filename, Oid lobjId);

but since your libpq-fe has this this interface, you might not want to
disable it. A "quick and dirty" fix would be to delete the ifdef
block. A better idea might be to change the condition such that the
code won't be compiled for your server version, eg, by examining some
'vendor specific macro'.

Search Discussions

Discussion Posts


Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 4 | next ›
Discussion Overview
groupdbd-pg @
postedAug 28, '13 at 7:56p
activeAug 31, '13 at 3:01p



site design / logo © 2023 Grokbase