Re: Note about include files - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Note about include files
Date
Msg-id 4558.970497903@sss.pgh.pa.us
Whole thread Raw
In response to Note about include files  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> On a related note, does anyone know why the on_proc_exit and on_shmem_exit
> hooks use a second argument of type `caddr_t' rather than, say, void*,
> char*, Datum, ...?  This artifact is the cause of about two thirds of the
> compile errors in the pedantic setting.

I was annoyed by that just the other day on an Alpha box (it provokes
lots of "integer cast to pointer of different size" warnings there).
I'm sure the use of caddr_t is strictly historical.

If you feel like doing something about it, changing the arguments of
these routines to be Datum and then adding the necessary
to-and-from-Datum macros seems like the obvious solution path.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Louis-David Mitterrand
Date:
Subject: failed assertion error on PG-7.0.2
Next
From: Tom Lane
Date:
Subject: Re: libpq PGHOST