From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Some small code-restructuring issues |
Date: | 2006-06-20 17:20:06 |
Message-ID: | 24598.1150824006@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
In pursuit of eliminating some redundant gettimeofday() calls, I just
tried to change struct Port's session_start field to TimestampTz,
which necessitated including utils/timestamp.h in libpq/libpq-be.h.
That caused things to blow up real good :-(. The problem is that
backend/libpq/md5.c includes c.h (not postgres.h) and then
libpq/crypt.h, and then the latter includes libpq/libpq-be.h, and that
fails because c.h doesn't define such things as Datum.
This is all pretty horrid code really, and I think we need to clean it
up. A relatively minimal fix would be to separate out the declarations
for md5.c into its own header file include/libpq/md5.h, which would not
need to include any backend-only definitions. More aggressively, we
could decide that since md5.c and ip.c are supposed to be both backend
and frontend code, they don't belong here at all, but should be in
libpgport (ie, move 'em to src/port). Moving them would lose some CVS
history but would probably be the cleanest thing in the long run.
Comments?
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2006-06-20 17:23:44 | Re: Slightly bogus regression test for contrib/dblink |
Previous Message | ohp | 2006-06-20 17:14:51 | Re: pltcl -- solved |