[HACKERS] Comment typo in _readExtensibleNode()

2016-05-06 Thread Amit Langote
Attached fixes a minor typo comment in _readExtensibleNode().

s/skip: extnodename/skip :extnodename/g

I was confused at first as to why there is a skip extnodename on one line
and get extnodename right on the next line as the comments say, :)

Thanks,
Amit
diff --git a/src/backend/nodes/readfuncs.c b/src/backend/nodes/readfuncs.c
index 6f28047..096bdde 100644
--- a/src/backend/nodes/readfuncs.c
+++ b/src/backend/nodes/readfuncs.c
@@ -2230,7 +2230,7 @@ _readExtensibleNode(void)
 	const char	   *extnodename;
 	READ_TEMP_LOCALS();
 
-	token = pg_strtok();		/* skip: extnodename */
+	token = pg_strtok();		/* skip :extnodename */
 	token = pg_strtok();		/* get extnodename */
 
 	extnodename = nullable_string(token, length);

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Poorly-thought-out handling of double variables in pgbench

2016-05-06 Thread Fabien COELHO


Hello Tom,


That's probably a bigger change than we want to be putting in right now,
though I'm a bit tempted to go try it.



I definitely agree that the text variable solution is pretty ugly, but it
was the minimum change solution, and I do not have much time available.


Well, I felt like doing some minor hacking, so I went and adjusted the
code to work this way.  I'm pretty happy with the result, what do you
think?


This is a definite improvement.

I like the lazyness between string & numeric forms, and for sorting, that 
is what was needed doing to have something clean.


Applied on head, it works for me.

While testing the patch I found a minor preexisting (mine...) bug: when 
string-scanning doubles, whether the whole string is consumed or not is 
not checked. This means that -D x=0one is interpreted as double 0.


I came up with the attached check, but maybe there is a cleaner way to do 
that.


--
Fabien.diff --git a/src/bin/pgbench/pgbench.c b/src/bin/pgbench/pgbench.c
index a484165..9673640 100644
--- a/src/bin/pgbench/pgbench.c
+++ b/src/bin/pgbench/pgbench.c
@@ -928,8 +928,10 @@ makeVariableNumeric(Variable *var)
 	else /* type should be double */
 	{
 		double dv;
+		int consumed;
 
-		if (sscanf(var->value, "%lf", ) != 1)
+		if (sscanf(var->value, "%lf%n", , ) != 1 ||
+			consumed != strlen(var->value))
 		{
 			fprintf(stderr,
 	"malformed variable \"%s\" value: \"%s\"\n",

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Initial release notes created for 9.6

2016-05-06 Thread Jeff Janes
On Thu, May 5, 2016 at 10:32 AM, Tom Lane  wrote:
> I've pushed a first cut at release notes for 9.6.  There's a good deal
> of work to do yet:

Thanks for assembling the notes.

This item:

"Avoid some spurious waits for AccessExclusiveLocks in hot-standby queries"

Should be something like

Avoid some unnecessary cancellations of hot-standy queries due to
AccessExclusiveLocks replay.

It was the cancellations, not the waits, which were spurious.

Cheers,

Jeff


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


<    1   2