incorrect libpq comment

Started by Robert Haasover 9 years ago3 messageshackers
Jump to latest
#1Robert Haas
robertmhaas@gmail.com

Bruce's commit 5d305d86bd917723f09ab4f15c075d90586a210a back in April
of 2014 includes this change:

     /* See PQconnectPoll() for how we use 'int' and not 'pgsocket'. */
-    int         sock;           /* Unix FD for socket, -1 if not connected */
+    pgsocket    sock;           /* FD for socket, PGINVALID_SOCKET if
unconnected */

I suppose Bruce must have overlooked the fact that the comment on the
previous line is now false. I think we should remove it, because it
makes no sense to say how we are using 'int' rather than 'pgsocket'
when in fact we are not using 'int' any more.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

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

#2Bruce Momjian
bruce@momjian.us
In reply to: Robert Haas (#1)
Re: incorrect libpq comment

On Wed, Oct 19, 2016 at 01:16:28PM -0400, Robert Haas wrote:

Bruce's commit 5d305d86bd917723f09ab4f15c075d90586a210a back in April
of 2014 includes this change:

/* See PQconnectPoll() for how we use 'int' and not 'pgsocket'. */
-    int         sock;           /* Unix FD for socket, -1 if not connected */
+    pgsocket    sock;           /* FD for socket, PGINVALID_SOCKET if
unconnected */

I suppose Bruce must have overlooked the fact that the comment on the
previous line is now false. I think we should remove it, because it
makes no sense to say how we are using 'int' rather than 'pgsocket'
when in fact we are not using 'int' any more.

Agreed.

--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ As you are, so once was I.  As I am, so you will be. +
+                      Ancient Roman grave inscription +

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

#3Robert Haas
robertmhaas@gmail.com
In reply to: Bruce Momjian (#2)
Re: incorrect libpq comment

On Wed, Oct 19, 2016 at 1:35 PM, Bruce Momjian <bruce@momjian.us> wrote:

On Wed, Oct 19, 2016 at 01:16:28PM -0400, Robert Haas wrote:

Bruce's commit 5d305d86bd917723f09ab4f15c075d90586a210a back in April
of 2014 includes this change:

/* See PQconnectPoll() for how we use 'int' and not 'pgsocket'. */
-    int         sock;           /* Unix FD for socket, -1 if not connected */
+    pgsocket    sock;           /* FD for socket, PGINVALID_SOCKET if
unconnected */

I suppose Bruce must have overlooked the fact that the comment on the
previous line is now false. I think we should remove it, because it
makes no sense to say how we are using 'int' rather than 'pgsocket'
when in fact we are not using 'int' any more.

Agreed.

Great. Nuked it.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

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