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

Re: Remove sort files

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Remove sort files
Date: 2001-05-23 20:10:42
Message-ID: 17261.990648642@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-patches
Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> OK, here is the new code:

>     snprintf(clear_pg_sorttemp, sizeof(clear_pg_sorttemp),
>             "sh -c '\
>             cd \"%s\"/base && \
>             ls | while read DIR; \
>             do \
>                 export DIR; \
>                 (cd \"$DIR\"/pg_sorttemp/ 2>/dev/null && rm -f *); \
>             done'",
>             DataDir);

A readdir() loop would be hardly any longer, and it'd be faster and more
secure.  Among other problems with the above code, we do not prohibit
double-quote in database paths anymore ...

			regards, tom lane

In response to

Responses

pgsql-patches by date

Next:From: Ned WolpertDate: 2001-05-23 20:15:17
Subject: RE: ANT fix for jar creation
Previous:From: Tom LaneDate: 2001-05-23 19:57:47
Subject: Re: Remove sort files

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