Re: Help, I dropped a system datatype, and now I'm ....

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Help, I dropped a system datatype, and now I'm ....
Дата
Msg-id 14951.988642116@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Help, I dropped a system datatype, and now I'm ....  ("Dave Cramer" <Dave@micro-automation.net>)
Список pgsql-general
"Dave Cramer" <Dave@micro-automation.net> writes:
> I inadvertantly dropped a system data type (box) and now I am getting errors
> cannot find datatype oid 603 when I do some selects

Oops.  Consider not doing your development work as superuser ;-)

> I have two possible solutions; 1 of which doesn't work yet

> insert back into the pg_type table the box row copied from another machine
> with oid 603, which postgres doesn't allow me to do.

AFAIR, this should work if you use COPY WITH OIDS.

> recreate the type and find all the references to it. Can someone tell me
> where to look for all the references to it?

This would not work very well since pg_dump would then think that 'box'
is a user-defined type and would include it in dumps, which you do not
want.  Instead, consider finding and dropping the procs, operators, etc
that refer to 'box' (only if you don't use the type, of course).
pg_proc and pg_operator would be the main places, there might also be
some in pg_amproc and pg_amop.  See contrib/findoidjoins/README for more
info about where to look.

            regards, tom lane

В списке pgsql-general по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: System catalogues
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Help, I dropped a system datatype, and now I'm ....