Re: Assessment on namespace clean include file names

Lists: pgsql-hackers
From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Assessment on namespace clean include file names
Date: 2001-08-22 22:18:32
Message-ID: Pine.LNX.4.30.0108222340391.679-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Here is what we install by default and what we could do about it:

c.h [1]
config.h rename to pg_config.h
ecpgerrno.h ok
ecpglib.h ok
ecpgtype.h ok
iodbc/ [3]
iodbc.h
isql.h
isqlext.h
lib/ [1]
dllist.h
libpgeasy.h ok
libpgtcl.h ok
libpq/ [1]
libpq-fs.h
pqcomm.h
libpq++/ ok
pgconnection.h
pgcursordb.h
pgdatabase.h
pglobject.h
pgtransdb.h
libpq++.h ok
libpq-fe.h ok
libpq-int.h [1]
os.h rename to pg_config_os.h
postgres_ext.h ok
postgres_fe.h [1]
pqexpbuffer.h [1]
sql3types.h [2]
sqlca.h [2]

[1] -- The libpq-int.h draws in a lot of internal structure, true to the
name. Something should be done about that, such as not installing it, or
moving it to a "hidden" place. Ideas?

[2] -- The ecpg preprocessor will actually include copies of these into
the output file when seeing the commands 'exec sql include sql3types;'
etc., thus not really making these include files in the traditional sense.
The names are okay for the moment, but I will research this some more.

[3] -- The names clash with the actual iodbc package. Not sure if this is
intended, but I will evaluate with the odbc group.

The idea I currently have for the installation layout including the server
includes is this:

--prefix=/usr/local/pgsql

libpq-fe.h => /usr/local/pgsql/include/libpq-fe.h
access/xlog.h => /usr/local/pgsql/include/server/access/xlog.h

--prefix=/usr/local

libpq-fe.h => /usr/local/include/libpq-fe.h
access/xlog.h => /usr/local/include/postgresql/server/access/xlog.h

pg_config will get an option --server-includedir to point to the files.

--
Peter Eisentraut peter_e(at)gmx(dot)net http://funkturm.homeip.net/~peter


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Assessment on namespace clean include file names
Date: 2001-08-23 23:27:01
Message-ID: 29488.998609221@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> [1] -- The libpq-int.h draws in a lot of internal structure, true to the
> name. Something should be done about that, such as not installing it, or
> moving it to a "hidden" place. Ideas?

libpq-int.h was always intended to be strictly internal. I made it part
of the export fileset when it was created because I feared that there were
probably applications out there that were using direct access to fields of
PGresult, and I wanted to give them breathing room to update their code.
But at this point they've had several releases worth of breathing room.
I see no reason why we can't drop the other shoe and stop exporting
libpq-int.h (or more accurately, move it out of the public namespace,
same as you propose for backend headers).

> The idea I currently have for the installation layout including the server
> includes is this:

> --prefix=/usr/local/pgsql

> libpq-fe.h => /usr/local/pgsql/include/libpq-fe.h
> access/xlog.h => /usr/local/pgsql/include/server/access/xlog.h

"server" may not be a great choice if we want to stick libpq-int.h into
it too...

regards, tom lane


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Assessment on namespace clean include file names
Date: 2001-08-24 19:31:33
Message-ID: 8531.998681493@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> Tom Lane writes:
>> I see no reason why we can't drop the other shoe and stop exporting
>> libpq-int.h (or more accurately, move it out of the public namespace,
>> same as you propose for backend headers).

>> "server" may not be a great choice if we want to stick libpq-int.h into
>> it too...

> The directory wasn't meant as a place for hiding things to avoid using
> them, it was supposed to be a really official place for interfacing to the
> server. If we want to hide things maybe we should have an "obsolete"
> subdirectory or some such.

"obsolete" is certainly not the right term either. Maybe we should have
an "interfaces" directory, parallel to "server", for internal-ish
includes of our interface libraries.

regards, tom lane


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Assessment on namespace clean include file names
Date: 2001-08-24 19:33:21
Message-ID: Pine.LNX.4.30.0108242129390.677-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Tom Lane writes:

> I see no reason why we can't drop the other shoe and stop exporting
> libpq-int.h (or more accurately, move it out of the public namespace,
> same as you propose for backend headers).

> "server" may not be a great choice if we want to stick libpq-int.h into
> it too...

The directory wasn't meant as a place for hiding things to avoid using
them, it was supposed to be a really official place for interfacing to the
server. If we want to hide things maybe we should have an "obsolete"
subdirectory or some such.

--
Peter Eisentraut peter_e(at)gmx(dot)net http://funkturm.homeip.net/~peter