Skip site navigation (1) Skip section navigation (2)

error:

From: "chetan N" <chetan622(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: error:
Date: 2008-09-29 13:38:50
Message-ID: 24ebf2060809290638t57e73cd4hff5708b739d7a336@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-general
Hi,
    I am trying to pass array of elements to store procedure, as follows

    CREATE TYPE emptype as(
                                                name text,
                                                id integer,
                                                dob date);

    Function header looks like this

    CREATE OR REPLACE FUNCTION passingEmployeeList(employeeList emptype[])
    RETURNS SETOF employee AS $$

    To execute i am using command

    SELECT * from passingEmployeeList(ARRAY[('chethan', 1,
'10-05-1983'),('ashok', 2, '10-05-1982')]::emptype[] );

    I am getting error as
    ERROR:  could not find array type for data type record


Regards,
chethan

Responses

pgsql-general by date

Next:From: yann.dubostDate: 2008-09-29 13:41:33
Subject: Re: Is there a parameter to tell postgresql to not attempt to open an IPv6 socket?
Previous:From: Raymond O'DonnellDate: 2008-09-29 13:26:45
Subject: Re: Replication using slony-I

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group