Re: pgsql: Minor pg_dump improvements - Mailing list pgsql-committers

From Tom Lane
Subject Re: pgsql: Minor pg_dump improvements
Date
Msg-id 18621.1391972103@sss.pgh.pa.us
Whole thread Raw
In response to Re: pgsql: Minor pg_dump improvements  (Stephen Frost <sfrost@snowman.net>)
Responses Re: pgsql: Minor pg_dump improvements  (Stephen Frost <sfrost@snowman.net>)
Re: pgsql: Minor pg_dump improvements  (Stephen Frost <sfrost@snowman.net>)
Re: pgsql: Minor pg_dump improvements  (Bernd Helmle <mailings@oopsware.de>)
List pgsql-committers
Stephen Frost <sfrost@snowman.net> writes:
> The only remaining place we still clear errno in pg_dump is in
> pg_backup_archive.c:checkSeek() around a similar ftello call, perhaps
> that should be changed to check the result instead also?

Agreed; we should be using the same coding pattern wherever we call
ftello.

I suspect that this code may be left over from coping with some ancient
non-spec-compliant version of ftello?  Probably not worth digging in
the archives to find out.  The Single Unix Spec v2 says that the result
is (off_t) -1 on error, and we generally assume that platforms are at
least compliant with that.

grep shows me a couple of other places where the result of ftello doesn't
seem to be getting checked for error.  Odd that Coverity didn't notice
those.

            regards, tom lane


pgsql-committers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: pgsql: Minor pg_dump improvements
Next
From: Stephen Frost
Date:
Subject: Re: pgsql: Minor pg_dump improvements