Re: [HACKERS] PATCH: CreateComments: use explicit indexing for ``values''

2011-06-16 Thread Tom Lane
richhguard-monot...@yahoo.co.uk writes: > This patch makes the intent of each initialization clear by using the > constants directly instead of in a comment, and has the effect of being able > to verify each line on it's own. The original requires verification of the > preceding i++'s. Applied,

Re: [HACKERS] PATCH: CreateComments: use explicit indexing for ``values''

2011-06-16 Thread Florian Pflug
On Jun14, 2011, at 17:47 , richhguard-monot...@yahoo.co.uk wrote: > This patch makes the intent of each initialization clear by using > the constants directly instead of in a comment, and has the effect > of being able to verify each line on it's own. The original requires > verification of the pre

Re: [HACKERS] PATCH: CreateComments: use explicit indexing for ``values''

2011-06-14 Thread richhguard-monotone
me to submit a patch which just changes comment.c by adding in the constants via a comment like the other places. What do you think ? Richard --- On Tue, 14/6/11, Alvaro Herrera wrote: > From: Alvaro Herrera > Subject: Re: [HACKERS] PATCH: CreateComments: use explicit indexing for > ``v

Re: [HACKERS] PATCH: CreateComments: use explicit indexing for ``values''

2011-06-14 Thread Alvaro Herrera
Excerpts from Tom Lane's message of mar jun 14 10:30:28 -0400 2011: > Alvaro Herrera writes: > > Excerpts from richhguard-monotone's message of lun jun 13 16:10:17 -0400 > > 2011: > >> Do you have any advice of how to handle the inner loops, such as those > >> initializing ``stakindN''. The entr

Re: [HACKERS] PATCH: CreateComments: use explicit indexing for ``values''

2011-06-14 Thread Robert Haas
On Tue, Jun 14, 2011 at 10:30 AM, Tom Lane wrote: > Alvaro Herrera writes: >> Excerpts from richhguard-monotone's message of lun jun 13 16:10:17 -0400 >> 2011: >>> Do you have any advice of how to handle the inner loops, such as those >>> initializing ``stakindN''. The entries before can be han

Re: [HACKERS] PATCH: CreateComments: use explicit indexing for ``values''

2011-06-14 Thread Tom Lane
Alvaro Herrera writes: > Excerpts from richhguard-monotone's message of lun jun 13 16:10:17 -0400 2011: >> Do you have any advice of how to handle the inner loops, such as those >> initializing ``stakindN''. The entries before can be handled just like in >> this patch, by using the symbolic cons

Re: [HACKERS] PATCH: CreateComments: use explicit indexing for ``values''

2011-06-14 Thread Alvaro Herrera
Excerpts from richhguard-monotone's message of lun jun 13 16:10:17 -0400 2011: > Apologies - I meant to CC in the list but forgot. > > I have gone through and changed all the related functions except > ``update_attstats''. > > Do you have any advice of how to handle the inner loops, such as thos

Re: [HACKERS] PATCH: CreateComments: use explicit indexing for ``values''

2011-06-14 Thread Robert Haas
On Mon, Jun 13, 2011 at 4:10 PM, wrote: > Apologies - I meant to CC in the list but forgot. > > I have gone through and changed all the related functions except > ``update_attstats''. > > Do you have any advice of how to handle the inner loops, such as those > initializing ``stakindN''. The ent

Re: [HACKERS] PATCH: CreateComments: use explicit indexing for ``values''

2011-06-13 Thread richhguard-monotone
s those initializing ``stakindN''. The entries before > can be handled just like in this patch, by using the > symbolic constants. > > Again, this is based on master and all existing tests > pass. > > Regards > Richard > > --- On Mon, 13/6/11, Tom Lane

Re: [HACKERS] PATCH: CreateComments: use explicit indexing for ``values''

2011-06-13 Thread Robert Haas
On Mon, Jun 13, 2011 at 11:09 AM, Tom Lane wrote: > I wrote: >>> Historically this i++ approach has been used in a lot of places that >>> fill in system catalog tuples.  We've fixed some of them over >>> time, but I doubt this is the only one remaining.  If we're going >>> to try to remove it here

Re: [HACKERS] PATCH: CreateComments: use explicit indexing for ``values''

2011-06-13 Thread Tom Lane
I wrote: >> Historically this i++ approach has been used in a lot of places that >> fill in system catalog tuples. We've fixed some of them over >> time, but I doubt this is the only one remaining. If we're going >> to try to remove it here, maybe we ought to try to fix them all >> rather than ju

Re: [HACKERS] PATCH: CreateComments: use explicit indexing for ``values''

2011-06-13 Thread Tom Lane
Robert Haas writes: > On Sun, Jun 12, 2011 at 7:26 AM, wrote: >> It's a readability improvement in src/backend/commands/comment.c >> (CreateComments function), which changes the existing code from incrementing >> a variable for use as the array index, to use explicit ``values'' instead. > Wow

Re: [HACKERS] PATCH: CreateComments: use explicit indexing for ``values''

2011-06-13 Thread Robert Haas
On Sun, Jun 12, 2011 at 7:26 AM, wrote: > Hello, > I'm new to PostgreSQL and git, but having read through the wiki entries such > as http://wiki.postgresql.org/wiki/Submitting_a_Patch, I think I have a patch > worthy of submission. > > It's a readability improvement in src/backend/commands/comm

[HACKERS] PATCH: CreateComments: use explicit indexing for ``values''

2011-06-13 Thread richhguard-monotone
Hello, I'm new to PostgreSQL and git, but having read through the wiki entries such as http://wiki.postgresql.org/wiki/Submitting_a_Patch, I think I have a patch worthy of submission. It's a readability improvement in src/backend/commands/comment.c (CreateComments function), which changes the e