Re: errcode redefinition

From: Andrew Vick <avick(at)remote-print(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-ports(at)postgresql(dot)org
Subject: Re: errcode redefinition
Date: 2006-06-15 22:27:56
Message-ID: 4491DEEC.8080708@remote-print.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-ports

Tom Lane wrote:
> Andrew Vick <avick(at)remote-print(dot)com> writes:
>
>>Tom Lane wrote:
>>
>>>Why are these drivers trying to include elog.h? That's a backend-only
>>>header. If the reason is that they're including postgres.h, they should
>>>likely be including postgres_fe.h instead.
>
>
>>That is the case. I tried switching it to postgres_fe.h, but then I
>>got errors about the pg_type structure not being defined.
>
>
> Where were those coming from? I'm trying to burrow down to what they're
> really after that's forcing them to include headers they shouldn't be
> including ...
>

In Postgres, the errors were coming from pg_type.h.
In Qt. they were coming from src/sql/drivers/psql/qsql_psql.cpp.

I've glanced through the Qt source, and I don't see any places where they try to access the members of any Postgres structures. I believe Qt is just wrapping the C interface to the Postgres libraries; maybe the problem is that this version of Qt (3.3.6) is too old for this version of Postgres (8.1 stable). Perhaps the Postgres headers have changed since the 8.0 release to cause this, and this release of Qt predates the change. If it weren't for that problem with errcode, I might be using an earlier version of Postgres.

-Andrew

In response to

Responses

Browse pgsql-ports by date

  From Date Subject
Next Message Tom Lane 2006-06-16 00:36:26 Re: errcode redefinition
Previous Message Tom Lane 2006-06-15 21:31:28 Re: errcode redefinition