Problem with pg_dump?

Поиск
Список
Период
Сортировка
От Ken Winter
Тема Problem with pg_dump?
Дата
Msg-id 001f01c84efa$e7ebcd00$6703a8c0@KenIBM
обсуждение исходный текст
Ответы Re: Problem with pg_dump?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Chris Browne
Дата:
Сообщение: Re: [OT] Slony (initial) Replication - Slow
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Problem with pg_dump?