Weird "null" errors during DROP TYPE (pg_upgrade)

Поиск
Список
Период
Сортировка
От Devrim Gündüz
Тема Weird "null" errors during DROP TYPE (pg_upgrade)
Дата
Msg-id b874eb76285f7f894aaa8e5d3ac106a1a73abd99.camel@gunduz.org
обсуждение исходный текст
Ответы Re: Weird "null" errors during DROP TYPE (pg_upgrade)
Список pgsql-hackers
Hi,

pg_ugprade from v15 to v16 failed in an environment. Often we get a
reasonable message, but this time it was a bit weird. First, error
message:

=====================================================================================
pg_restore: creating TYPE "foobar._packagestoptemp"
pg_restore: while PROCESSING TOC:
pg_restore: from TOC entry 2418; 1247 20529 TYPE _packagestoptemp developer
pg_restore: error: could not execute query: ERROR:  type "_packagestoptemp" does not exist
HINT:  Create the type as a shell type, then create its I/O functions, then do a full CREATE TYPE.
Command was:
-- For binary upgrade, must preserve pg_type oid
SELECT pg_catalog.binary_upgrade_set_next_pg_type_oid('20529'::pg_catalog.oid);

CREATE TYPE "foobar"."_packagestoptemp" (
    INTERNALLENGTH = variable,
    INPUT = "array_in",
    OUTPUT = "array_out",
    RECEIVE = "array_recv",
    SEND = "array_send",
    ANALYZE = "array_typanalyze",
    SUBSCRIPT = "array_subscript_handler",
    ELEMENT = ???,
    CATEGORY = 'A',
    ALIGNMENT = double,
    STORAGE = extended
);
=====================================================================================

We noticed that this data type was actually not used, so decided to drop it:

===================
DROP TYPE "foobar"."_packagestoptemp";
ERROR:  cannot drop (null) because (null) requires it
HINT:  You can drop (null) instead.

===================

What do these "null" mean here? Any hints?,

Thanks!

Regards,
--
Devrim Gündüz
Open Source Solution Architect, PostgreSQL Major Contributor
Twitter: @DevrimGunduz , @DevrimGunduzTR



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

Предыдущее
От: Jacob Champion
Дата:
Сообщение: Re: [PATCH] json_lex_string: don't overread on bad UTF8
Следующее
От: Devrim Gündüz
Дата:
Сообщение: Re: HEAD build error on Fedora 39