| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Boszormenyi Zoltan <zb(at)cybertec(dot)at> |
| Cc: | Amit kapila <amit(dot)kapila(at)huawei(dot)com>, "'Robert Haas'" <robertmhaas(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Re: Proposal for Allow postgresql.conf values to be changed via SQL [review] |
| Date: | 2013-01-18 20:32:15 |
| Message-ID: | 28379.1358541135@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Boszormenyi Zoltan <zb(at)cybertec(dot)at> writes:
> 2013-01-18 11:05 keltezssel, Amit kapila rta:
>> On using mktemp, linux compilation gives below warning
>> warning: the use of `mktemp' is dangerous, better use `mkstemp'
>>
>> So I planned to use mkstemp.
> Good.
On my HPUX box, the man page disapproves of both, calling them obsolete
(and this man page is old enough to vote, I believe...)
Everywhere else that we need to do something like this, we just use our
own PID to disambiguate, ie
sprintf(tempfilename, "/path/to/file.%d", (int) getpid());
There is no need to deviate from that pattern or introduce portability
issues, since we can reasonably assume that no non-Postgres programs are
creating files in this directory.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2013-01-18 20:37:47 | Re: foreign key locks |
| Previous Message | Simon Riggs | 2013-01-18 20:24:50 | Re: foreign key locks |