Re: support for POSIX 1003.1-2001 hosts - Mailing list pgsql-patches

From Paul Eggert
Subject Re: support for POSIX 1003.1-2001 hosts
Date
Msg-id 200203120559.g2C5xUj02921@sic.twinsun.com
Whole thread Raw
In response to Re: support for POSIX 1003.1-2001 hosts  ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>)
Responses Re: support for POSIX 1003.1-2001 hosts
List pgsql-patches
> From: "Christopher Kings-Lynne" <chriskl@familyhealth.com.au>
> Date: Tue, 12 Mar 2002 10:35:35 +0800
> Importance: Normal
>
> What's wrong with "head -n 1"?

Nothing's wrong with it from a standards-compliance point of view.

But I worry that "head -n 1" may not work on some older (pre-POSIX)
hosts, as it did not work on Unix Version 7 hosts.  In contrast, "sed
q" did work on those ancient hosts, so I figure "sed q" should be
safer.  "sed 1q" should be equally good from a portability viewpoint,
if you prefer.

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: ALTER TABLE OWNER: change indexes
Next
From: Yury Bokhoncovich
Date:
Subject: Re: ALTER TABLE OWNER: change indexes