pg_dump creates bad dump / pgadmin crash issue - Mailing list pgsql-general

From Daniel Whitter
Subject pg_dump creates bad dump / pgadmin crash issue
Date
Msg-id 1AD4FF3C9CFD714C86BE2A287F5B64C32B501E@sx-mail.intern.solution-x.com
Whole thread Raw
Responses Re: pg_dump creates bad dump / pgadmin crash issue
List pgsql-general
Hello,

I'm new to postgresql and during testing for a script I've found some
curious things.

If I do the following things a bad dump will be created that can't be
restored (using pgadmin3, pg_dump and pg_restore or psql).
There's also a issue that pgadmin crash.

In pgadmin3 do
1)  Create a new db ('test_dump')
2)  Create a new schema ('test_dump')

3)  From schema 'pg_catalog' copy the lines from
    CREATE OPERATOR <(... for <(abstime,abstime), <=(abstime,abstime),
    =(abstime,abstime), >(abstime,abstime), >=(abstime,abstime)
    and paste it in the query window. Write the schema name 'test_dump.'

    before the operator sign and execute the query.
    I've done this once for each operator.

4)  Then copy the lines for operator class 'abstime_ops(btree)' from
    schema 'pg_catalog' and paste it in the query window.
    Write the schema name 'test_dump.' before the class and remove the
    'default'. Then execute the query.

If you click on the created operator class in schema 'test_dump'
you'll get a error message box or on windows pgAdmin will crash.

If you create a dump (pg_dump) of this schema and try to restore
it you'll get a error from pg_restore or psql.

daniel@artus ~ $ psql -d test_dump -f testdump.sql -U postgres
SET
SET
SET
CREATE SCHEMA
SET
psql:testdump.sql:29: ERROR:  syntax error at or near ">" at character
123
psql:testdump.sql:29: LINE 5:     COMMUTATOR = pg_catalog.>,
psql:testdump.sql:29:                                     ^
psql:testdump.sql:43: ERROR:  syntax error at or near ">=" at character
124
psql:testdump.sql:43: LINE 5:     COMMUTATOR = pg_catalog.>=,
psql:testdump.sql:43:                                     ^
psql:testdump.sql:62: ERROR:  syntax error at or near "=" at character
123
psql:testdump.sql:62: LINE 5:     COMMUTATOR = pg_catalog.=,
psql:testdump.sql:62:                                     ^
psql:testdump.sql:76: ERROR:  syntax error at or near "<" at character
123
psql:testdump.sql:76: LINE 5:     COMMUTATOR = pg_catalog.<,
psql:testdump.sql:76:                                     ^
psql:testdump.sql:90: ERROR:  syntax error at or near "<=" at character
124
psql:testdump.sql:90: LINE 5:     COMMUTATOR = pg_catalog.<=,
psql:testdump.sql:90:                                     ^
CREATE OPERATOR CLASS
dw@artus ~ $


> daniel@aruts> postmaster --version
> postmaster (PostgreSQL) 8.0.4

pgadmin3 version 1.4.1


greetings,
Daniel Whitter

pgsql-general by date:

Previous
From: rlhsiao@gmail.com
Date:
Subject: help with rules for system table
Next
From: Emi Lu
Date:
Subject: Vacuum all tables unders under one schema (not under one database)