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

Re: pg_dump return status..

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_dump return status..
Date: 2001-01-05 23:14:15
Message-ID: 15183.978736455@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-hackers
>> An fprintf returning 0 is a suspicious event; it's easy to imagine 
>> cases where it makes sense, but I don't think I have ever coded one.
>> Probably > N (where N is the smallest reasonable output, defaulting 
>> to 1) may be a better test in real code.

> On older systems fprintf returns 0 on success and EOF on failure.

The books I have all recommend testing for "a negative return value"
to detect printf errors.  The C standard also specifies "a negative
value" for errors --- it is not guaranteed that that value is EOF.

			regards, tom lane

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2001-01-05 23:25:38
Subject: Re: bootstrap tables
Previous:From: Alex PilosovDate: 2001-01-05 23:06:55
Subject: Re: SHM ids (was running pgsql 7 under Jail'ed virtual machine on FreeBSD 4.2)

pgsql-general by date

Next:From: Tom LaneDate: 2001-01-05 23:44:41
Subject: Re: SHM ids (was running pgsql 7 under Jail'ed virtual machine on FreeBSD 4.2)
Previous:From: Alex PilosovDate: 2001-01-05 23:06:55
Subject: Re: SHM ids (was running pgsql 7 under Jail'ed virtual machine on FreeBSD 4.2)

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