pgsql: Small stylistic improvement in recent FORCE QUOTE * code - use a

Started by Andrew Dunstanalmost 17 years ago3 messagescomitters
Jump to latest
#1Andrew Dunstan
andrew@dunslane.net

Log Message:
-----------
Small stylistic improvement in recent FORCE QUOTE * code - use a bool instead of a magic value.

Modified Files:
--------------
pgsql/src/backend/commands:
copy.c (r1.313 -> r1.314)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/copy.c?r1=1.313&r2=1.314)

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Andrew Dunstan (#1)
Re: pgsql: Small stylistic improvement in recent FORCE QUOTE * code - use a

adunstan@postgresql.org (Andrew Dunstan) writes:

Log Message:
-----------
Small stylistic improvement in recent FORCE QUOTE * code - use a bool instead of a magic value.

This actually broke things a bit. I agree that the original coding with
a phony list header was horridly ugly, but it did have one redeeming
value: namely that the various existing tests for force_quote not empty
still worked as-is. With the separate bool you need to extend all those
checks. On balance it still seems cleaner that way, though, so I made
the necessary fixes.

regards, tom lane

#3Andrew Dunstan
andrew@dunslane.net
In reply to: Tom Lane (#2)
Re: pgsql: Small stylistic improvement in recent FORCE QUOTE * code - use a

Tom Lane wrote:

adunstan@postgresql.org (Andrew Dunstan) writes:

Log Message:
-----------
Small stylistic improvement in recent FORCE QUOTE * code - use a bool instead of a magic value.

This actually broke things a bit. I agree that the original coding with
a phony list header was horridly ugly, but it did have one redeeming
value: namely that the various existing tests for force_quote not empty
still worked as-is. With the separate bool you need to extend all those
checks. On balance it still seems cleaner that way, though, so I made
the necessary fixes.

Oops! Thanks. That will teach me to code before I have my coffee.

cheers

andrew