Arrays, types and prodedures

From: "Chris Hoy" <chris(dot)hoy(at)hoyc(dot)fsnet(dot)co(dot)uk>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: Arrays, types and prodedures
Date: 2008-07-25 08:32:23
Message-ID: 626EAD1E737C4DFE821ED92FF30D8652@Yellowstone
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi

I am having trouble passing arrays of types to a store procedure
I have the following type

CREATE TYPE IndexElement AS (
keyname text,
keytype integer
);

and the header for the store prodedure is as follows:

CREATE OR REPLACE FUNCTION doIndexGroupCount(
indexs IndexElement[],
customerid INTEGER ,
logic INTEGER )

but when I try and call it using the following code

SELECT * from doIndexGroupCount(ARRAY[('dog', 1),('cat', 1)],10,0);

I get and error

ERROR: could not find array type for data type record

What am I missing?

Chris

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Pavel Stehule 2008-07-25 08:38:49 Re: Arrays, types and prodedures
Previous Message Richard Broersma 2008-07-24 21:15:36 Re: Select default values