Problem with pg_dump? - Mailing list pgsql-general

From Ken Winter
Subject Problem with pg_dump?
Date
Msg-id 001f01c84efa$e7ebcd00$6703a8c0@KenIBM
Whole thread Raw
Responses Re: Problem with pg_dump?
List pgsql-general
When I do a pg_dump from an 8.1 database (with options schema-only,
no-owner, and plain format), the dump file includes the following:

"
--
-- TOC entry 1623 (class 1259 OID 17618)
-- Dependencies: 5 1624
-- Name: transaction_transaction_id_seq; Type: SEQUENCE; Schema: public;
-- Owner: -
--

CREATE SEQUENCE transaction_transaction_id_seq
    INCREMENT BY 1
    NO MAXVALUE
    NO MINVALUE
    CACHE 1;

--
-- TOC entry 3403 (class 0 OID 0)
-- Dependencies: 1623
-- Name: transaction_transaction_id_seq; Type: SEQUENCE OWNED BY; Schema:
-- public; Owner: -
--
"

ALTER SEQUENCE transaction_transaction_id_seq OWNED BY
"transaction".transaction_id;

When I try to execute the dump script, the second command produces this
error:

"
ERROR:     syntax error at or near "OWNED"
"

as well it should, since the "OWNED" clause is not part of the ALTER
SEQUENCE syntax (see
http://www.postgresql.org/docs/8.1/static/sql-altersequence.html), which is:

"
ALTER SEQUENCE name [ INCREMENT [ BY ] increment ]
    [ MINVALUE minvalue | NO MINVALUE ] [ MAXVALUE maxvalue | NO MAXVALUE ]
    [ RESTART [ WITH ] start ] [ CACHE cache ] [ [ NO ] CYCLE ]
ALTER SEQUENCE name SET SCHEMA new_schema
"

(Full disclosure: I am actually getting this error when working through the
tool "PG Lightning Assistant" (see
http://www.amsoftwaredesign.com/lightning_admin.php).  I assume that PGLA
uses pg_dump to execute its "backup database" command.  However, if no one
else in PostgreSQL-land has encountered this problem, presumably it is a bug
in PGLA, not in pg_dump, and I will take my problem there.)

If it is a pg_dump bug, are there plans to fix it?  And, meanwhile, any
workarounds other than manually editing the pg_dump DDL file?

~ TIA
~ Ken


pgsql-general by date:

Previous
From: Chris Browne
Date:
Subject: Re: [OT] Slony (initial) Replication - Slow
Next
From: Tom Lane
Date:
Subject: Re: Problem with pg_dump?