pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Achilleus Mantzios <achill@matrix.gatewaynet.com>
To: pgsql-general@postgresql.org, <pgsql-sql@postgresql.org>
Subject: 7.3.1 function problem: ERROR:  cache lookup failed for type 0
Date: Tue, 7 Jan 2003 19:55:33 -0200 (GMT+2)
Message-ID: <Pine.LNX.4.44.0301071943200.9521-100000@matrix.gatewaynet.com> (raw)
In-Reply-To: <Pine.LNX.4.44.0301071338480.7770-100000@matrix.gatewaynet.com>


Hi i had written a C function to easily convert an int4 to its
equivalent 1x1 int4[] array.

It worked fine under 7.1,7.2.
Now under 7.3.1 i get the following message whenever i try to:

dynacom=# select itoar(3126);
ERROR:  cache lookup failed for type 0

Surprisingly though when i do something like :

dynacom=# select defid from machdefs where itoar(3126) ~ parents and
level(parents) = 1 order by description,partno;
 defid
-------
  3137
  3127
  3130
  3129
  3133
  3136
  3135
  3128
  3131
  3132
  3134
  3138
(12 rows)

it works fine, but then again when i try to EXPLAIN the above (successful)
statement i also get:

dynacom=# EXPLAIN  select defid from machdefs where itoar(3126) ~ parents
and
level(parents) = 1 order by description,partno;
ERROR:  cache lookup failed for type 0


Any clues of what could be wrong??

The definition of the function is:

CREATE FUNCTION "itoar" (integer) RETURNS integer[] AS
'$libdir/itoar', 'itoar' LANGUAGE 'c' WITH ( iscachable,isstrict );

I also tried without the iscachable option with no luck
(since it seems to complain about *type* 0)

==================================================================
Achilleus Mantzios
S/W Engineer
IT dept
Dynacom Tankers Mngmt
Nikis 4, Glyfada
Athens 16610
Greece
tel:    +30-10-8981112
fax:    +30-10-8981877
email:  achill@matrix.gatewaynet.com
        mantzios@softlab.ece.ntua.gr




view thread (4+ messages)  latest in thread

Message-ID: <Pine.LNX.4.44.0301071943200.9521-100000@matrix.gatewaynet.com>
Permalink:  ../Pine.LNX.4.44.0301071943200.9521-100000@matrix.gatewaynet.com/
Also on:    postgresql.org/message-id/Pine.LNX.4.44.0301071943200.9521-100000@matrix.gatewaynet.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: achill@matrix.gatewaynet.com
  Subject: Re: 7.3.1 function problem: ERROR:  cache lookup failed for type 0
  In-Reply-To: <Pine.LNX.4.44.0301071943200.9521-100000@matrix.gatewaynet.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox