Re: Updating copyright notices to 2015 for PGDG - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Updating copyright notices to 2015 for PGDG
Date
Msg-id 20150106205411.GB17824@momjian.us
Whole thread Raw
In response to Re: Updating copyright notices to 2015 for PGDG  (Stefan Kaltenbrunner <stefan@kaltenbrunner.cc>)
Responses Re: Updating copyright notices to 2015 for PGDG
List pgsql-hackers
On Tue, Jan  6, 2015 at 08:46:19PM +0100, Stefan Kaltenbrunner wrote:
> > I will run the script today.  I didn't do it earlier because I want to
> > be current on reading community email before doing it.
> 
> hmm is it intentional that the commit also changed other files?
> 
> looks like the commited patch added newlines to various files that had
> none before for example:

Specifically, these files had no newline after the last line in the
file.

> src/test/isolation/specs/nowait-2.spec
> src/test/isolation/specs/nowait-3.spec
> src/test/isolation/specs/skip-locked-4.spec
> src/test/modules/commit_ts/commit_ts.conf
> 
> http://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=4baaf863eca5412e07a8441b3b7e7482b7a8b21a#patch1352
> 
> while I do think that the files should have newlines I dont think those
> should be added in a copyright bump commit and I think the script might
> actually break files where we specifically dont want a newline (afaik we
> dont have atm but still)

Well, I am guessing the Perl 'tie' is adding them as there is no
explicit newline added in the script, and the Tie docs confirm that:
http://search.cpan.org/~toddr/Tie-File-1.00/lib/Tie/File.pm
Because the chomped value will have the separator reattached when it iswritten back to the file. There is no way to
createa file whosetrailing record separator string is missing.
 

There are probably other scripts that assume all lines end in a newline.
Is it worth changing the copyright script to preserve the lack of
newlines --- I doubt it.  I have added a Perl comment about this
behavior, though.

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + Everyone has their own god. +



pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: INSERT ... ON CONFLICT UPDATE and RLS
Next
From: Robert Haas
Date:
Subject: Re: parallel mode and parallel contexts