Re: cache lookup error for shell type creation with incompatible output function (DDL deparsing bug)

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: cache lookup error for shell type creation with incompatible output function (DDL deparsing bug)
Date: 2015-04-22 19:36:22
Message-ID: 20150422193622.GG4369@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alvaro Herrera wrote:
> Michael Paquier wrote:
> > Hi all,
> >
> > I just bumped into the following problem in HEAD (1c41e2a):
> > =# create type my_array_float (INPUT = array_in, OUTPUT = array_out,
> > ELEMENT = float4, INTERNALLENGTH = 32);
> > ERROR: XX000: cache lookup failed for type 0
> > LOCATION: format_type_internal, format_type.c:135

I also wanted to point out, but forgot, that this command is not really
creating a shell type -- it's creating a full-blown type, because there
are args. Shell types are created when no args are given. This happens
to fail due to the internal creation of the shell type because of the
failure to look up the i/o functions, but as far as I can see the
original code should fail in any type creation in pretty much the same
way (didn't actually test that); not completely sure why this wasn't
more visible in regression tests.

I simply removed the word "shell" in the provided test case in the
committed version, anyway.

--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Petr Jelinek 2015-04-22 20:01:57 Re: Sequence Access Method WIP
Previous Message Heikki Linnakangas 2015-04-22 19:34:05 Re: Streaming replication and WAL archive interactions