pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Re: 7.3.1 function problem: ERROR: cache lookup failed for type 0
4+ messages / 3 participants
[nested] [flat]

* 7.3.1 function problem: ERROR:  cache lookup failed for type 0
@ 2003-01-07 21:55 Achilleus Mantzios <achill@matrix.gatewaynet.com>
  2003-01-07 18:22 ` Re: 7.3.1 function problem: ERROR: cache lookup failed for type 0 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 4+ messages in thread

From: Achilleus Mantzios @ 2003-01-07 21:55 UTC (permalink / raw)
  To: pgsql-sql


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




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: 7.3.1 function problem: ERROR: cache lookup failed for type 0
  2003-01-07 21:55 7.3.1 function problem: ERROR:  cache lookup failed for type 0 Achilleus Mantzios <achill@matrix.gatewaynet.com>
@ 2003-01-07 18:22 ` Tom Lane <tgl@sss.pgh.pa.us>
  2003-01-07 22:32   ` Re: 7.3.1 function problem: ERROR: cache lookup failed Achilleus Mantzios <achill@matrix.gatewaynet.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Tom Lane @ 2003-01-07 18:22 UTC (permalink / raw)
  To: Achilleus Mantzios <achill@matrix.gatewaynet.com>; +Cc: pgsql-general@postgresql.org; pgsql-sql

Achilleus Mantzios <achill@matrix.gatewaynet.com> writes:
> Hi i had written a C function to easily convert an int4 to its
> equivalent 1x1 int4[] array.

Does your function know about filling in the elemtype field that was
recently added to struct ArrayType?

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: 7.3.1 function problem: ERROR: cache lookup failed
  2003-01-07 21:55 7.3.1 function problem: ERROR:  cache lookup failed for type 0 Achilleus Mantzios <achill@matrix.gatewaynet.com>
  2003-01-07 18:22 ` Re: 7.3.1 function problem: ERROR: cache lookup failed for type 0 Tom Lane <tgl@sss.pgh.pa.us>
@ 2003-01-07 22:32   ` Achilleus Mantzios <achill@matrix.gatewaynet.com>
  2003-01-07 18:39     ` Re: 7.3.1 function problem: ERROR: cache lookup failed Joe Conway <mail@joeconway.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Achilleus Mantzios @ 2003-01-07 22:32 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-sql

On Tue, 7 Jan 2003, Tom Lane wrote:

> Achilleus Mantzios <achill@matrix.gatewaynet.com> writes:
> > Hi i had written a C function to easily convert an int4 to its
> > equivalent 1x1 int4[] array.
>
> Does your function know about filling in the elemtype field that was
> recently added to struct ArrayType?

She has no clue :)

Any pointers would be great.
Thanx Tom.

>
> 			regards, tom lane
>

==================================================================
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




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: 7.3.1 function problem: ERROR: cache lookup failed
  2003-01-07 21:55 7.3.1 function problem: ERROR:  cache lookup failed for type 0 Achilleus Mantzios <achill@matrix.gatewaynet.com>
  2003-01-07 18:22 ` Re: 7.3.1 function problem: ERROR: cache lookup failed for type 0 Tom Lane <tgl@sss.pgh.pa.us>
  2003-01-07 22:32   ` Re: 7.3.1 function problem: ERROR: cache lookup failed Achilleus Mantzios <achill@matrix.gatewaynet.com>
@ 2003-01-07 18:39     ` Joe Conway <mail@joeconway.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Joe Conway @ 2003-01-07 18:39 UTC (permalink / raw)
  To: Achilleus Mantzios <achill@matrix.gatewaynet.com>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; pgsql-general@postgresql.org; pgsql-sql

Achilleus Mantzios wrote:
> On Tue, 7 Jan 2003, Tom Lane wrote:
>>Does your function know about filling in the elemtype field that was
>>recently added to struct ArrayType?
> 
> She has no clue :)
> 
> Any pointers would be great.

See construct_array() in src/backend/utils/adt/arrayfuncs.c.

HTH,

Joe




^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2003-01-07 22:32 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-01-07 21:55 7.3.1 function problem: ERROR:  cache lookup failed for type 0 Achilleus Mantzios <achill@matrix.gatewaynet.com>
2003-01-07 18:22 ` Tom Lane <tgl@sss.pgh.pa.us>
2003-01-07 22:32   ` Re: 7.3.1 function problem: ERROR: cache lookup failed Achilleus Mantzios <achill@matrix.gatewaynet.com>
2003-01-07 18:39     ` Re: 7.3.1 function problem: ERROR: cache lookup failed Joe Conway <mail@joeconway.com>

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