Re: Updating copyright notices to 2015 for PGDG

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc>
Cc: David Fetter <david(at)fetter(dot)org>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Updating copyright notices to 2015 for PGDG
Date: 2015-01-06 20:54:11
Message-ID: 20150106205411.GB17824@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 is
written back to the file. There is no way to create a file whose
trailing 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(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2015-01-06 21:01:51 Re: parallel mode and parallel contexts
Previous Message Peter Geoghegan 2015-01-06 20:44:38 Re: INSERT ... ON CONFLICT UPDATE and RLS