Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-patches by date

Next:From: Yury BokhoncovichDate: 2002-03-12 06:08:14
Subject: Re: ALTER TABLE OWNER: change indexes
Previous:From: Tom LaneDate: 2002-03-12 05:40:49
Subject: Re: ALTER TABLE OWNER: change indexes

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group