Thread: pg_proc.h
contains the following: /* ----------------* initial contents of pg_proc* ----------------*/ /* keep the following ordered by OID so that later changes can be made easier */ which has manifestly not been followed. Should we fix the file or remove the second comment? cheers andrew
> -----Original Message----- > From: pgsql-hackers-owner@postgresql.org > [mailto:pgsql-hackers-owner@postgresql.org] On Behalf Of > Andrew Dunstan > Sent: 10 November 2005 14:30 > To: PostgreSQL-development > Subject: [HACKERS] pg_proc.h > > > contains the following: > > /* ---------------- > * initial contents of pg_proc > * ---------------- > */ > > /* keep the following ordered by OID so that later changes > can be made > easier */ > > > which has manifestly not been followed. Should we fix the > file or remove > the second comment? I vote for fixing the file (but then I'm not doing the work). Unused_oids or whatevers it's called is fine, but it's still handy to be able to read the file easily. Regards, Dave
Andrew Dunstan <andrew@dunslane.net> writes: > contains the following: > /* keep the following ordered by OID so that later changes can be made > easier */ > which has manifestly not been followed. Should we fix the file or remove > the second comment? Reordering the file into strict OID order is certainly a loser, as it'd remove whatever semblance of logical structure remains. However I think the comment has some historical value. Perhaps reword it a bit. regards, tom lane
"Dave Page" <dpage@vale-housing.co.uk> writes: > I vote for fixing the file (but then I'm not doing the work). > Unused_oids or whatevers it's called is fine, but it's still handy to be > able to read the file easily. Our convention is that hand-assigned OIDs are *globally* unique, not just within the particular catalog. This means you *must* use unused_oids to find a free OID; eyeballing the catalog listing isn't enough, even if it were in strict order. Given that, I think "readability" really consists in keeping related functions together. If we were going to do any wholesale reordering, I'd want to see it done with an eye to sorting the functions into logical groups, not a blind numeric sort. regards, tom lane
> -----Original Message----- > From: Tom Lane [mailto:tgl@sss.pgh.pa.us] > Sent: 10 November 2005 15:38 > To: Dave Page > Cc: Andrew Dunstan; PostgreSQL-development > Subject: Re: [HACKERS] pg_proc.h > > "Dave Page" <dpage@vale-housing.co.uk> writes: > > I vote for fixing the file (but then I'm not doing the work). > > Unused_oids or whatevers it's called is fine, but it's > still handy to be > > able to read the file easily. > > Our convention is that hand-assigned OIDs are *globally* unique, > not just within the particular catalog. This means you *must* use > unused_oids to find a free OID; eyeballing the catalog listing isn't > enough, even if it were in strict order. Yes, I realise that, my point was that unused_oids doesn't make the file more readable. > Given that, I think "readability" really consists in keeping related > functions together. If we were going to do any wholesale reordering, > I'd want to see it done with an eye to sorting the functions into > logical groups, not a blind numeric sort. That makes sense for groups of functions, but one-offs, or ones that are not easily categorised will just end up being dumped anywhere in there. You hack that file *far* more than I do though, so I can't really argue against what you think would be most convenient. Regards, Dave.