Lists: | pgsql-hackers |
---|
From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org> |
Subject: | formatting.c |
Date: | 2014-09-13 00:44:47 |
Message-ID: | 20140913004447.GB25518@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
I am researching some problems with formatting.c, and I now see that the
naming of things makes the code pretty incomprehensible.
Is everyone OK with me renaming some variables, structures, and macros?
It will make back-patching harder, but will allow us to properly maintain
that file.
Right now, when we find problems in the file, fixing things is a
nightmare, so no one really wants to do it.
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ Everyone has their own god. +
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Bruce Momjian <bruce(at)momjian(dot)us> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: formatting.c |
Date: | 2014-09-13 03:48:03 |
Message-ID: | 29756.1410580083@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Bruce Momjian <bruce(at)momjian(dot)us> writes:
> Is everyone OK with me renaming some variables, structures, and macros?
> It will make back-patching harder, but will allow us to properly maintain
> that file.
The back-patching problem could be addressed by back-patching the
renaming. If it's purely a mechanical thing, there should be minimal risk
no? I would claim that messed-up back-patches would have non-negligible
risk too, so you can't say that not back-patching is clearly safer.
Now, whether the renaming actually makes things any clearer is something
I reserve judgment on.
regards, tom lane
From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: formatting.c |
Date: | 2014-09-13 14:26:45 |
Message-ID: | 20140913142645.GE25518@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Fri, Sep 12, 2014 at 11:48:03PM -0400, Tom Lane wrote:
> Bruce Momjian <bruce(at)momjian(dot)us> writes:
> > Is everyone OK with me renaming some variables, structures, and macros?
> > It will make back-patching harder, but will allow us to properly maintain
> > that file.
>
> The back-patching problem could be addressed by back-patching the
> renaming. If it's purely a mechanical thing, there should be minimal risk
> no? I would claim that messed-up back-patches would have non-negligible
> risk too, so you can't say that not back-patching is clearly safer.
Uh, yes, it is mechanical and could be backpatched as well.
> Now, whether the renaming actually makes things any clearer is something
> I reserve judgment on.
What the code does now is call almost everything a "number", including
the format values, binary and string representations of the number, etc.
You can take a look at reverted commit
f68dc5d86b9f287f80f4417f5a24d876eb13771d to see an example of the
renaming; that is probably only half the job.
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ Everyone has their own god. +