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

[7.0beta3] Bug in initdb

From: Marc Baudoin <babafou(at)babafou(dot)eu(dot)org>
To: bugs(at)postgreSQL(dot)org
Subject: [7.0beta3] Bug in initdb
Date: 2000-04-02 20:36:19
Message-ID: 20000402223618.A420@skiff.babafou.eu.org (view raw or flat)
Thread:
Lists: pgsql-bugs
Sorry but I couldn't find the bug-template file as indicated in
item 1.13 of the FAQ.

I came across a minor bug in PostgreSQL 7.0beta3 on my NetBSD 1.4
system when running initdb (compile was smooth):

initdb: data path must be specified as an absolute path

It seems the ! if this test takes precedence over the pipe:

if echo "$PGDATA" | grep -v '^/' > /dev/null 2>&1
then
    echo "$CMDNAME: data path must be specified as an absolute path"
fi

This patch solves the problem:

--- initdb.orig       Sun Apr  2 22:32:40 2000
+++ initdb      Sun Apr  2 22:28:21 2000
@@ -282,7 +282,7 @@
 # The data path must be absolute, because the backend doesn't like
 # '.' and '..' stuff. (Should perhaps be fixed there.)
 
-if ! echo "$PGDATA" | grep '^/' > /dev/null 2>&1
+if echo "$PGDATA" | grep -v '^/' > /dev/null 2>&1
 then
     echo "$CMDNAME: data path must be specified as an absolute path"
 fi

Anyway, thanks for your efforts, I've been using PostgreSQL for
nearly a year now and it really is a good RDBMS.

-- 
Marc Baudoin   -=-   <babafou(at)babafou(dot)eu(dot)org>

Responses

pgsql-bugs by date

Next:From: Peter EisentrautDate: 2000-04-02 21:17:59
Subject: Re: --enable-locale doesn't work
Previous:From: wernerDate: 2000-04-02 14:07:51
Subject: Re: --enable-locale doesn't work

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