Re: Discontent with development process (was:Re: pgaccess - the discussion is over)

From: Myron Scott <mkscott(at)sacadia(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Hannu Krosing <hannu(at)tm(dot)ee>, Lamar Owen <lamar(dot)owen(at)wgcr(dot)org>, mlw <markw(at)mohawksoft(dot)com>, Iavor Raytchev <iavor(dot)raytchev(at)verysmall(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Discontent with development process (was:Re: pgaccess - the discussion is over)
Date: 2002-05-14 14:54:36
Message-ID: 3CE1252C.3090006@sacadia.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-interfaces

Tom Lane wrote:

>Hannu Krosing <hannu(at)tm(dot)ee> writes:
>
>>What would your opinion be of some hack with macros, like
>>
>
>>#if (Win32 or THREADED)
>>#define GLOBAL_ pg_globals.
>>#else
>>#define GLOBAL_
>>#endif
>>
>
>>and then use global variables as
>>
>
>>GLOBAL_globvar
>>
>
>>At least in my opinion that would increase both readability and
>>maintainability.
>>
>
>>From a code readability viewpoint this is not at all better than just
>moving everything to pg_globals. You're only spelling "pg_globals."
>a little differently. And it introduces twin possibilities for error:
>omitting GLOBAL_ (if you're a Unix developer) or writing
>pg_globals. explicitly (if you're a Win32 guy). I suppose these errors
>would be caught as soon as someone tried to compile on the other
>platform, but it still seems like a mess with little redeeming value.
>

Another suggestion might be to create a global hashtable that stores the
size and pointer
to global structures for each subsection. Each subsection can define
its own globals
structure and register them with the hashtable. This would not impact
readablity and
make the gobal environment easy to copy. IMHO, this is possible with
minimal performance
impact.

Myron Scott
mkscott(at)sacadia(dot)com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-05-14 15:59:32 Re: Discontent with development process (was:Re: pgaccess - the discussion is over)
Previous Message Tom Lane 2002-05-14 14:30:07 Re: Discontent with development process (was:Re: pgaccess - the discussion is over)

Browse pgsql-interfaces by date

  From Date Subject
Next Message Tom Lane 2002-05-14 15:59:32 Re: Discontent with development process (was:Re: pgaccess - the discussion is over)
Previous Message Tom Lane 2002-05-14 14:30:07 Re: Discontent with development process (was:Re: pgaccess - the discussion is over)