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

Re: [HACKERS] need help with csh

From: "Thomas G(dot) Lockhart" <lockhart(at)alumni(dot)caltech(dot)edu>
To: Patrick Welche <prlw1(at)cam(dot)ac(dot)uk>
Cc: hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] need help with csh
Date: 1998-10-06 01:34:07
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Patrick Welche wrote:
> > And how shall it dsitinguish between a path and a variable?
> > >   setenv PGDATA2 /home/postgres/data
> > >   initlocation PGDATA2
> > And how shall it distinguish between a path and a variable?
> > But this could mean the path PGDATA2 too, couldn't it?

I test that the argument, when translated, has a non-empty result. If it
doesn't, I assume that it is an actual path.

> initlocation $PGDATA2

Yes, that's how it has always worked. I wanted it to also function
correctly when invoked with the environment variable as an argument (if
someone forgets to put in the "dollar sign").

I have a working version committed to the cvs tree which uses printenv
to extract the contents of the argument. It correctly distinguishes
between paths and envars, and does the right thing with both.

I'd appreciate any reports of problems on any platforms or environments.
Thanks all for the tips.

                  - Tom

In response to

pgsql-hackers by date

Next:From: Bruce MomjianDate: 1998-10-06 01:56:50
Subject: Re: [HACKERS] Open 6.4 items
Previous:From: Tom LaneDate: 1998-10-05 23:39:39
Subject: Re: [HACKERS] TCL_ARRAYS code in libpgtcl is pretty seriously broken

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