Re: support for POSIX 1003.1-2001 hosts

From: Paul Eggert <eggert(at)twinsun(dot)com>
To: chriskl(at)familyhealth(dot)com(dot)au
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: support for POSIX 1003.1-2001 hosts
Date: 2002-03-12 05:59:30
Message-ID: 200203120559.g2C5xUj02921@sic.twinsun.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

> From: "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)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.

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Yury Bokhoncovich 2002-03-12 06:08:14 Re: ALTER TABLE OWNER: change indexes
Previous Message Tom Lane 2002-03-12 05:40:49 Re: ALTER TABLE OWNER: change indexes