From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
Cc: | John Naylor <jcnaylor(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: WIP: a way forward on bootstrap data |
Date: | 2018-03-22 14:57:03 |
Message-ID: | 958.1521730623@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> writes:
> how about letting the line go long, with the comment at the right of
> each definition, with one blank line between struct members, as in the
> sample below?
> NameData proname; /* procedure name */
> Oid pronamespace BKI_DEFAULT(PGNSP); /* OID of namespace containing this proc */
> Oid proowner BKI_DEFAULT(PGUID); /* procedure owner */
I don't think this is going to work: pgindent is going to wrap most of
these comments, ending up with something that's ugly *and* consumes
just as much vertical space as if we'd given the comments their own
lines. The problem is that in the headers where we were using
same-line comments, the comments were written to fit in the space
available without this extra annotation. (For my money, having spent
lots of time shaving a character or two off such comments to make 'em
fit, I'd much prefer the luxury of having a whole line to write in.)
We could go with some scheme that preserves the old formatting of the
struct definition proper and puts the added info somewhere else, ie
Oid pronamespace; /* OID of namespace containing this proc */
Oid prolang; /* OID of pg_language entry */
then after the struct:
BKI_DEFAULT(pronamespace, PGNSP);
BKI_DEFAULT(prolang, 12);
but on the whole I don't think that's an improvement. I'd rather keep
the info about a field together.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | John Naylor | 2018-03-22 15:02:56 | Re: WIP: a way forward on bootstrap data |
Previous Message | Tom Lane | 2018-03-22 14:46:44 | Re: WIP: a way forward on bootstrap data |