Re: pgsql: Minor pg_dump improvements

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Minor pg_dump improvements
Date: 2014-02-09 18:59:34
Message-ID: 20140209185934.GB2921@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

* Tom Lane (tgl(at)sss(dot)pgh(dot)pa(dot)us) wrote:
> Stephen Frost <sfrost(at)snowman(dot)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.

Ok, I'll take care of that in a couple of hours (have to step out for a
bit).

> 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.

I had been wondering the same, but agree w/ your assessment.

> 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.

I'll try to figure out why it didn't, I would have expected it to. It's
possible I just hadn't gotten to those yet or someone decided they were
non-issues.

Thanks,

Stephen

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Stephen Frost 2014-02-09 23:13:10 Re: pgsql: Minor pg_dump improvements
Previous Message Tom Lane 2014-02-09 18:55:03 Re: pgsql: Minor pg_dump improvements