Обсуждение: error from postgresql 8.4.0 after a dump/restore from 8.3.5

Поиск
Список
Период
Сортировка

error from postgresql 8.4.0 after a dump/restore from 8.3.5

От
Kenneth Marshall
Дата:
Dear PostgreSQL admins.

I have just restored a DB from 8.3.5 to 8.4.0 and I just
received the error:

ERROR:  column "reltriggers" does not exist at character 41
STATEMENT:  SELECT relhasindex, relkind, relchecks, reltriggers, relhasrules,
        relhasoids , reltablespace
        FROM pg_catalog.pg_class WHERE oid = '16864'


Does anyone know what is giving that error and how to fix
it? I do see that in 8.4.0 the table has a column named
relhastriggers, while 8.3 has reltriggers. I used pg_dump
from 8.4 to dump the DB but I restored by piping into psql.
Any ideas?

Regards,
Ken

Re: error from postgresql 8.4.0 after a dump/restore from 8.3.5

От
Kenneth Marshall
Дата:
I just thought of something, would running an older release of pgadmin
cause this error?

Cheers,
Ken

On Wed, Aug 05, 2009 at 06:29:07PM -0500, Kenneth Marshall wrote:
> Dear PostgreSQL admins.
>
> I have just restored a DB from 8.3.5 to 8.4.0 and I just
> received the error:
>
> ERROR:  column "reltriggers" does not exist at character 41
> STATEMENT:  SELECT relhasindex, relkind, relchecks, reltriggers, relhasrules,
>         relhasoids , reltablespace
>         FROM pg_catalog.pg_class WHERE oid = '16864'
>
>
> Does anyone know what is giving that error and how to fix
> it? I do see that in 8.4.0 the table has a column named
> relhastriggers, while 8.3 has reltriggers. I used pg_dump
> from 8.4 to dump the DB but I restored by piping into psql.
> Any ideas?
>
> Regards,
> Ken
>
> --
> Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-admin
>

Re: error from postgresql 8.4.0 after a dump/restore from 8.3.5

От
Steve Crawford
Дата:
Kenneth Marshall wrote:
> I just thought of something, would running an older release of pgadmin
> cause this error?
>
>
>
>> I have just restored a DB from 8.3.5 to 8.4.0 and I just
>> received the error:
>>
>> ERROR:  column "reltriggers" does not exist at character 41
>> STATEMENT:  SELECT relhasindex, relkind, relchecks, reltriggers, relhasrules,
>>         relhasoids , reltablespace
>>         FROM pg_catalog.pg_class WHERE oid = '16864'
>>
>>
>> ...

Very likely. Here are the pg_class columns in 8.3 and 8.4. Note that
reltriggers indeed does not exist in 8.4.

8.3:
      Table "pg_catalog.pg_class"
     Column     |   Type    | Modifiers
----------------+-----------+-----------
 relname        | name      | not null
 relnamespace   | oid       | not null
 reltype        | oid       | not null
 relowner       | oid       | not null
 relam          | oid       | not null
 relfilenode    | oid       | not null
 reltablespace  | oid       | not null
 relpages       | integer   | not null
 reltuples      | real      | not null
 reltoastrelid  | oid       | not null
 reltoastidxid  | oid       | not null
 relhasindex    | boolean   | not null
 relisshared    | boolean   | not null
 relkind        | "char"    | not null
 relnatts       | smallint  | not null
 relchecks      | smallint  | not null
 reltriggers    | smallint  | not null
 relukeys       | smallint  | not null
 relfkeys       | smallint  | not null
 relrefs        | smallint  | not null
 relhasoids     | boolean   | not null
 relhaspkey     | boolean   | not null
 relhasrules    | boolean   | not null
 relhassubclass | boolean   | not null
 relfrozenxid   | xid       | not null
 relacl         | aclitem[] |
 reloptions     | text[]    |

8.4:
      Table "pg_catalog.pg_class"
     Column     |   Type    | Modifiers
----------------+-----------+-----------
 relname        | name      | not null
 relnamespace   | oid       | not null
 reltype        | oid       | not null
 relowner       | oid       | not null
 relam          | oid       | not null
 relfilenode    | oid       | not null
 reltablespace  | oid       | not null
 relpages       | integer   | not null
 reltuples      | real      | not null
 reltoastrelid  | oid       | not null
 reltoastidxid  | oid       | not null
 relhasindex    | boolean   | not null
 relisshared    | boolean   | not null
 relistemp      | boolean   | not null
 relkind        | "char"    | not null
 relnatts       | smallint  | not null
 relchecks      | smallint  | not null
 relhasoids     | boolean   | not null
 relhaspkey     | boolean   | not null
 relhasrules    | boolean   | not null
 relhastriggers | boolean   | not null
 relhassubclass | boolean   | not null
 relfrozenxid   | xid       | not null
 relacl         | aclitem[] |
 reloptions     | text[]    |


Cheers,
Steve