Re: errcode redefinition

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

Andrew Vick <avick(at)remote-print(dot)com> writes:
> Tom Lane wrote:
>> 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.

If you remove the inclusion of pg_type.h, does it build? I'm thinking
maybe the reason for this pushup is that they need access to the type
OID macros in pg_type.h (INT4OID and friends). I've been thinking
that we need to provide a way for frontend apps to use those macros
without including a bunch of backend-only stuff --- if that's what's
going on here, that would be ammunition to propose a change.

I'd appreciate it if you include postgres_fe.h instead of postgres.h,
remove any other PG header inclusions that cause errors without
postgres.h, and then see what errors are left in the Qt code.

regards, tom lane

In response to

Browse pgsql-ports by date

  From Date Subject
Next Message Marc Lepage 2006-06-26 18:34:05 gettimeofday problem with mingw
Previous Message Andrew Vick 2006-06-15 22:27:56 Re: errcode redefinition