Re: [7.4beta3] pg_dump -t xxx won't output sequences - Mailing list pgsql-bugs

From Tom Lane
Subject Re: [7.4beta3] pg_dump -t xxx won't output sequences
Date
Msg-id 12655.1064686995@sss.pgh.pa.us
Whole thread Raw
In response to [7.4beta3] pg_dump -t xxx won't output sequences  (Tomas Szepe <szepe@pinerecords.com>)
Responses Re: [7.4beta3] pg_dump -t xxx won't output sequences
List pgsql-bugs
Tomas Szepe <szepe@pinerecords.com> writes:
> Not sure if this is a bug, but still. :)

> pgsql7.3.4$ pg_dump -a -t seq_wtmp db1
> [ works ]

> pgsql7.4beta3$ pg_dump -a -t seq_wtmp db1
> pg_dump: specified table "seq_wtmp" does not exist

Looking at the CVS history, I see that Neil added code to deliberately
reject this case, but I don't understand why.

    /*
     * If the user is attempting to dump a specific table, check to ensure
     * that the specified table actually exists (and is a table or a view,
     * not a sequence).
     */
    if (selectTableName)
    {
        for (i = 0; i < ntups; i++)
            if (strcmp(tblinfo[i].relname, selectTableName) == 0 &&
                tblinfo[i].relkind != 'S')
                break;

Neil, what's the reason not to allow dumping just a sequence?

            regards, tom lane

pgsql-bugs by date:

Previous
From: Tomas Szepe
Date:
Subject: [7.4beta3] pg_dump -t xxx won't output sequences
Next
From: Neil Conway
Date:
Subject: Re: [7.4beta3] pg_dump -t xxx won't output sequences