pg_conn not declared in libpq-fe.h?

Started by Hauke Joachim Zuehlover 22 years ago4 messageshackers
Jump to latest
#1Hauke Joachim Zuehl
hzuehl@athene.dnsalias.org

Hello :)

I want to compile a program which uses libpq-fe.h but it seems that
structure pg_conn ist not declared.

I have SuSE 8.2 and postgresql-devel-7.3.2-42

Thanks for any hints :)

Kind regards,
Hauke
--
Aus Ben Hur (1959): Wer nicht fuer Rom ist, ist gegen Rom
George W. Bush (2002): Wer nicht fuer uns ist, ist gegen uns

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Hauke Joachim Zuehl (#1)
Re: pg_conn not declared in libpq-fe.h?

Hauke Joachim Zuehl <hzuehl@athene.dnsalias.org> writes:

I want to compile a program which uses libpq-fe.h but it seems that
structure pg_conn ist not declared.

The typedef is named PGconn.

regards, tom lane

#3Hauke Joachim Zuehl
hzuehl@athene.dnsalias.org
In reply to: Tom Lane (#2)
Re: pg_conn not declared in libpq-fe.h?

Hi :)

Am Mit, 2003-07-23 um 06.21 schrieb Tom Lane:

Hauke Joachim Zuehl <hzuehl@athene.dnsalias.org> writes:

I want to compile a program which uses libpq-fe.h but it seems that
structure pg_conn ist not declared.

The typedef is named PGconn.

Well, that's clear but there is another problem:
hauke@fafnir [pgsql] >>grep -H "typedef.*PGconn" *.h
libpq-fe.h:typedef struct pg_conn PGconn;
hauke@fafnir [pgsql] >>grep -H "pg_conn" *.h
libpq-fe.h:typedef struct pg_conn PGconn;
hauke@fafnir [pgsql] >>

So I miss the structure pg_conn :(
Maybe I have to include more than just libpq-fe.h?

hauke@fafnir [pgsql] >>find . -name "*.h" -exec grep -H pg_conn {} \;
./libpq-fe.h:typedef struct pg_conn PGconn;
./internal/libpq-int.h:struct pg_conn
hauke@fafnir [pgsql] >>

But I read I do not need lipq-int.h anymore.

regards, tom lane

Kind regards,
Hauke
--
Aus Ben Hur (1959): Wer nicht fuer Rom ist, ist gegen Rom
George W. Bush (2002): Wer nicht fuer uns ist, ist gegen uns

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Hauke Joachim Zuehl (#3)
Re: pg_conn not declared in libpq-fe.h?

Hauke Joachim Zuehl <hzuehl@athene.dnsalias.org> writes:

Well, that's clear but there is another problem:
hauke@fafnir [pgsql] >>grep -H "typedef.*PGconn" *.h
libpq-fe.h:typedef struct pg_conn PGconn;
hauke@fafnir [pgsql] >>grep -H "pg_conn" *.h
libpq-fe.h:typedef struct pg_conn PGconn;
hauke@fafnir [pgsql] >>

So I miss the structure pg_conn :(
Maybe I have to include more than just libpq-fe.h?

You're right, the contents of the structure are not exported by the
library. Your code should only use pointers to the struct, so it ought
not care what is in the struct.

regards, tom lane