Some small code-restructuring issues
От | Tom Lane |
---|---|
Тема | Some small code-restructuring issues |
Дата | |
Msg-id | 24598.1150824006@sss.pgh.pa.us обсуждение исходный текст |
Ответы |
Re: Some small code-restructuring issues
|
Список | 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
В списке pgsql-hackers по дате отправления: