Thread: pg_dump and "could not identify an ordering operator for type name"

pg_dump and "could not identify an ordering operator for type name"

From
Gerardo Herzig
Date:
Hi dudes. Im facing a problem with pg_dump,

pg_dump: SQL command failed
pg_dump: Error message from server: ERROR:  could not identify an
ordering operator for type name
HINT:  Use an explicit ordering operator or modify the query.
pg_dump: The command was: SELECT t.tableoid, t.oid, t.relname as
indexname, pg_catalog.pg_get_indexdef(i.indexrelid) as indexdef,
t.relnatts as indnkeys, i.indkey, i.indisclustered, c.contype,
c.conname, c.tableoid as contableoid, c.oid as conoid, (SELECT spcname
FROM pg_catalog.pg_tablespace s WHERE s.oid = t.reltablespace) as
tablespace, array_to_string(t.reloptions, ', ') as options FROM
pg_catalog.pg_index i JOIN pg_catalog.pg_class t ON (t.oid =
i.indexrelid) LEFT JOIN pg_catalog.pg_depend d ON (d.classid =
t.tableoid AND d.objid = t.oid AND d.deptype = 'i') LEFT JOIN
pg_catalog.pg_constraint c ON (d.refclassid = c.tableoid AND d.refobjid
= c.oid) WHERE i.indrelid = '7929896'::pg_catalog.oid ORDER BY indexname

Dumping of other databases works fine. Looks like a corrupted internal
table, isnt?

Any hints?

Gerardo


Re: pg_dump and "could not identify an ordering operator for type name"

From
Martin Marques
Date:
Gerardo Herzig escribió:
> Hi dudes. Im facing a problem with pg_dump,
> 
> pg_dump: SQL command failed
> pg_dump: Error message from server: ERROR:  could not identify an
> ordering operator for type name
> HINT:  Use an explicit ordering operator or modify the query.
> pg_dump: The command was: SELECT t.tableoid, t.oid, t.relname as
> indexname, pg_catalog.pg_get_indexdef(i.indexrelid) as indexdef,
> t.relnatts as indnkeys, i.indkey, i.indisclustered, c.contype,
> c.conname, c.tableoid as contableoid, c.oid as conoid, (SELECT spcname
> FROM pg_catalog.pg_tablespace s WHERE s.oid = t.reltablespace) as
> tablespace, array_to_string(t.reloptions, ', ') as options FROM
> pg_catalog.pg_index i JOIN pg_catalog.pg_class t ON (t.oid =
> i.indexrelid) LEFT JOIN pg_catalog.pg_depend d ON (d.classid =
> t.tableoid AND d.objid = t.oid AND d.deptype = 'i') LEFT JOIN
> pg_catalog.pg_constraint c ON (d.refclassid = c.tableoid AND d.refobjid
> = c.oid) WHERE i.indrelid = '7929896'::pg_catalog.oid ORDER BY indexname
> 
> Dumping of other databases works fine. Looks like a corrupted internal
> table, isnt?

Version og pg_dump and version of the PG server, ¿are they the same?

Try connecting to *the problematic DB* and issue a query against 
pg_index to see if the catalog table is OK.