Re: Multiple -t options for pg_dump - Mailing list pgsql-patches

From Neil Conway
Subject Re: Multiple -t options for pg_dump
Date
Msg-id 1127242166.17597.17.camel@localhost.localdomain
Whole thread Raw
In response to Re: Multiple -t options for pg_dump  (David Fetter <david@fetter.org>)
List pgsql-patches
On Tue, 2005-20-09 at 11:33 -0700, David Fetter wrote:
> I am hoping to make a case for inclusion in 8.1.  The code is
> completely isolated in one command and does not affect anyone who
> does not use the new features.

On those grounds we could include a lot of new features during the 8.1
beta period. IMHO it is too late for new features at this point in the
release cycle.

> > AFAICS the goto is unnecessary -- just break out of the loop when you
> > find a match, and test i == ntups outside the loop.
>
> I tried that.  How do I break out of both loops without a goto?

Oh, yeah, I guess you need a goto, but you can at least avoid rechecking
the loop condition:

for (;;)
{
    for (;;)
    {
        if (match_found)
            goto done;
    }
}

/* If we got here, no match */
error();

done: /* Otherwise we're good */

-Neil



pgsql-patches by date:

Previous
From: David Fetter
Date:
Subject: Re: Multiple -t options for pg_dump
Next
From: Bruce Momjian
Date:
Subject: Re: [PORTS] Solaris - psql returns 0 instead of 1 for file not found.