Skip site navigation (1) Skip section navigation (2)

Re: Small xlog.c cleanup

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: The Hermit Hacker <scrappy(at)hub(dot)org>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Matthew Kirkwood <matthew(at)hairy(dot)beasts(dot)org>, pgsql-patches(at)postgresql(dot)org
Subject: Re: Small xlog.c cleanup
Date: 2001-02-27 18:38:38
Message-ID: 4873.983299118@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-patches
The Hermit Hacker <scrappy(at)hub(dot)org> writes:
> He's moved the "static globals" from around line 286 of
> src/backend/access/transam/xlog.c:
> to be static locals inside of function ReadRecord around line 1216 in the
> same file:

This is not usual coding practice in Postgres, so far as I've noticed.

I prefer to avoid static locals because the fact that they *are* static
is easily missed.  In particular it's way too easy to misread the
initialization as something that happens on every entry to the function,
rather than only once.  So my opinion is that this change is bad style.

			regards, tom lane

In response to

Responses

pgsql-patches by date

Next:From: The Hermit HackerDate: 2001-02-27 19:10:07
Subject: Re: Small xlog.c cleanup
Previous:From: The Hermit HackerDate: 2001-02-27 18:31:35
Subject: Re: Small xlog.c cleanup

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group