Thread: Trying to get rid of a type

Trying to get rid of a type

From
Tom Jenkins
Date:
Hello all,
We misspelled the OPAQUE declaration in a function as opapue.  now we
have a type record in the pg_type table that looks like this:

-[ RECORD 1 ]+-------
typname      | opapue
typowner     | 0
typlen       | 0
typprtlen    | 0
typbyval     | f
typtype      |
typisdefined | f
typdelim     |
typrelid     | 0
typelem      | 0
typinput     | -
typoutput    | -
typreceive   | -
typsend      | -
typalign     | i
typstorage   | p
typdefault   | opapue

i've tried DROP TYPE opapue but got
ERROR:  RemoveType: type '_opapue' does not exist

when we dump the database we get a warning:
pg_dump: WARNING: owner of data type opapue appears to be invalid

the data still dumps but i want to get rid of this warning.  i'm
hesitant to delete the record directly out of pg_type.  Should I or
shouldn't I delete it?

PostgreSQL version 7.2.1
--

Tom Jenkins
Development InfoStructure
http://www.devis.com



Re: Trying to get rid of a type

From
Tom Lane
Date:
Tom Jenkins <tjenkins@devis.com> writes:
> We misspelled the OPAQUE declaration in a function as opapue.
> i've tried DROP TYPE opapue but got
> ERROR:  RemoveType: type '_opapue' does not exist
> when we dump the database we get a warning:
> pg_dump: WARNING: owner of data type opapue appears to be invalid

Sure, just delete the record from pg_type.  pg_dump should probably
be ignoring the record altogether ...

            regards, tom lane

Re: Trying to get rid of a type

From
Tom Jenkins
Date:
On Thu, 2002-06-13 at 15:57, Tom Lane wrote:
> Tom Jenkins <tjenkins@devis.com> writes:
> > We misspelled the OPAQUE declaration in a function as opapue.
> > i've tried DROP TYPE opapue but got
> > ERROR:  RemoveType: type '_opapue' does not exist
> > when we dump the database we get a warning:
> > pg_dump: WARNING: owner of data type opapue appears to be invalid
>
> Sure, just delete the record from pg_type.  pg_dump should probably
> be ignoring the record altogether ...
>

Excellent, i'll delete it right now.  When it comes to touching the
system tables i've been described as well... hesitant (though in more
colorful language).
--

Tom Jenkins
Development InfoStructure
http://www.devis.com