Re: Still not able to initdb - Mailing list pgsql-hackers

From Michael Meskes
Subject Re: Still not able to initdb
Date
Msg-id 20031013062448.GF1836@feivel.fam-meskes.de
Whole thread Raw
In response to Still not able to initdb  (Michael Meskes <meskes@postgresql.org>)
Responses Re: Still not able to initdb  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Still not able to initdb  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
On Mon, Oct 13, 2003 at 02:38:26AM +0100, Oliver Elphick wrote:
> On Sun, 2003-10-12 at 13:27, Michael Meskes wrote:
> > I just tried the latest Debian packages for beta4 and I still cannot
> > initdb. It's the same old problem. Once I add a "\." to sql_features.txt
> > it works well, but without it it errors out. 
> > 
> > Needless to say that the 'echo "\."' is there in initdb, but it still
> > doesn't work without the additional entry in sql_features.txt. No idea
> > why.
> 
> There must be some difference between our systems.
> [...]
> One other possibility: initdb uses /bin/sh.  On my system, that is
> provided by bash

That's it! I'm using ash as sh.

I have no idea why, but the reason is that the last CR is not read by
the postgres process as proved by an strace run. After adding an
additional 'echo' after the 'echo "\."' makes initdb run just fine with
ash.

But when I try simulating this and run

(
echo "COPY information_schema.sql_features (feature_id, feature_name, sub_feature_id, sub_feature_name, is_supported,
comments)FROM STDIN;"
 
cat /usr/share/postgresql/sql_features.txt
echo "\."
) | tail -2|od -xc

both shells reveal the same output.

Michael
-- 
Michael Meskes
Email: Michael at Fam-Meskes dot De
ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: meskes@jabber.org
Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re:
Next
From: "Andrew Dunstan"
Date:
Subject: Re: [PATCHES] fix for strict-alias warnings