Another pgindent gripe

Started by Tom Laneabout 12 years ago2 messageshackers
Jump to latest
#1Tom Lane
tgl@sss.pgh.pa.us

I noticed that current pgindent wants to do this to a recently-added
comment in psql/copy.c:

*************** handleCopyIn(PGconn *conn, FILE *copystr
*** 627,633 ****
                                        /*
                                         * This code erroneously assumes '\.' on a line alone
                                         * inside a quoted CSV string terminates the \copy.
!                                        * http://www.postgresql.org/message-id/E1TdNVQ-0001ju-GO@wrigleys.postgresql.org
                                         */
                                        if (strcmp(buf, "\\.\n") == 0 ||
                                                strcmp(buf, "\\.\r\n") == 0)
--- 627,634 ----
                                        /*
                                         * This code erroneously assumes '\.' on a line alone
                                         * inside a quoted CSV string terminates the \copy.
!                                        * http://www.postgresql.org/message-id/E1TdNVQ-0001ju-GO@w
!                                        * rigleys.postgresql.org
                                         */
                                        if (strcmp(buf, "\\.\n") == 0 ||
                                                strcmp(buf, "\\.\r\n") == 0)

Doesn't seem particularly friendly.

regards, tom lane

--
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: Tom Lane (#1)
Re: Another pgindent gripe

On Thu, Feb 13, 2014 at 06:14:17PM -0500, Tom Lane wrote:

I noticed that current pgindent wants to do this to a recently-added
comment in psql/copy.c:

*************** handleCopyIn(PGconn *conn, FILE *copystr
*** 627,633 ****
/*
* This code erroneously assumes '\.' on a line alone
* inside a quoted CSV string terminates the \copy.
!                                        * http://www.postgresql.org/message-id/E1TdNVQ-0001ju-GO@wrigleys.postgresql.org
*/
if (strcmp(buf, "\\.\n") == 0 ||
strcmp(buf, "\\.\r\n") == 0)
--- 627,634 ----
/*
* This code erroneously assumes '\.' on a line alone
* inside a quoted CSV string terminates the \copy.
!                                        * http://www.postgresql.org/message-id/E1TdNVQ-0001ju-GO@w
!                                        * rigleys.postgresql.org
*/
if (strcmp(buf, "\\.\n") == 0 ||
strcmp(buf, "\\.\r\n") == 0)

Doesn't seem particularly friendly.

Yeah, that is ugly, and I was about to add a URL to a C comment myself
today.

I can set the column target width, but there doesn't seem to be any flag
that says to avoid breaking text to do the wrapping.

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

+ Everyone has their own god. +

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