Lists: | pgsql-hackers |
---|
From: | Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> |
---|---|
To: | PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | pgbench - minor doc improvements |
Date: | 2016-07-09 07:48:38 |
Message-ID: | alpine.DEB.2.20.1607090943430.3412@sto |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Lists: | pgsql-hackers |
Minor pgbench documentation improvements so that the description is more
precise:
- a pgbench script may not contain SQL commands, it only needs not to be
empty.
- point out explicitely variable setting meta commands.
- the formula is short enough to fit on a line.
--
Fabien.
Attachment | Content-Type | Size |
---|---|---|
pgbench-doc-1.patch | text/x-diff | 2.5 KB |
From: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
---|---|
To: | Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> |
Cc: | PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pgbench - minor doc improvements |
Date: | 2016-07-11 04:51:03 |
Message-ID: | CAB7nPqQZxwxpEGAuq8X17VPi+9VYMGFoqd8t6yJcxz9yru3aGw@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Sat, Jul 9, 2016 at 4:48 PM, Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> wrote:
>
> Minor pgbench documentation improvements so that the description is more
> precise:
>
> - a pgbench script may not contain SQL commands, it only needs not to be
> empty.
Halfly true as far as I recall. This works and generates two queries:
SELECT 1; \set two 3
SELECT :two;
But any query added after the meta-command cannot be parsed.
> - point out explicitely variable setting meta commands.
> - the formula is short enough to fit on a line.
<literallayout>
-f(x) = PHI(2.0 * parameter * (x - mu) / (max - min + 1)) /
- (2.0 * PHI(parameter) - 1)
+f(x) = PHI(2.0 * parameter * (x - mu) / (max - min + 1)) / (2.0 *
PHI(parameter) - 1)
At full-length this is 85 characters. But I agree that it is more
readable to put that into a single line. Now we could as well trick
the limit by using "param" instead of "parameter".
--
Michael
From: | Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> |
---|---|
To: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
Cc: | PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pgbench - minor doc improvements |
Date: | 2016-07-11 05:30:14 |
Message-ID: | alpine.DEB.2.20.1607110710410.12659@sto |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Lists: | pgsql-hackers |
Hello Michaël,
>> Minor pgbench documentation improvements so that the description is more
>> precise:
>>
>> - a pgbench script may not contain SQL commands, it only needs not to be
>> empty.
>
> Halfly true as far as I recall. This works and generates two queries:
> SELECT 1; \set two 3
Maybe it used to work, but not anymore:
client 0 aborted in state 0: ERROR: syntax error at or near "\"
LINE 1: SELECT 1 ; \set two 3
>> - point out explicitely variable setting meta commands.
>> - the formula is short enough to fit on a line.
>
> <literallayout>
> -f(x) = PHI(2.0 * parameter * (x - mu) / (max - min + 1)) /
> - (2.0 * PHI(parameter) - 1)
> +f(x) = PHI(2.0 * parameter * (x - mu) / (max - min + 1)) / (2.0 *
> PHI(parameter) - 1)
> At full-length this is 85 characters.
I agree on principle, however the issue is the "literal layout", the line
is also broken in the resulting HTML and it looks pretty strange there:
https://www.postgresql.org/docs/devel/static/pgbench.html
> But I agree that it is more readable to put that into a single line. Now
> we could as well trick the limit by using "param" instead of
> "parameter".
ISTM that it would mean changing the text in a dozen places to be
consistent, and it would not necessary be an improvement in some of those
places... So I'm hesitant to follow on that suggestion. For me the "under
80 column" rule cannot really apply on a "literal layout" block.
--
Fabien.
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> |
Cc: | PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pgbench - minor doc improvements |
Date: | 2016-08-19 21:41:40 |
Message-ID: | [email protected] |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Lists: | pgsql-hackers |
Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> writes:
> Minor pgbench documentation improvements so that the description is more
> precise:
> - a pgbench script may not contain SQL commands, it only needs not to be
> empty.
> - point out explicitely variable setting meta commands.
> - the formula is short enough to fit on a line.
I looked at this, but I don't really find any of these changes to be
improvements. They just make it harder to read IMO.
regards, tom lane
From: | Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pgbench - minor doc improvements |
Date: | 2016-08-24 06:32:23 |
Message-ID: | alpine.DEB.2.20.1608240831100.7102@lancre |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Lists: | pgsql-hackers |
> I looked at this, but I don't really find any of these changes to be
> improvements. They just make it harder to read IMO.
I marked the patch as rejected in CF 2016-09.
--
Fabien.