Re:

From: Kevin Grittner <kgrittn(at)ymail(dot)com>
To: Sergey Gigoyan <sergey(dot)gigoyan(at)gmail(dot)com>, "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org>
Subject: Re:
Date: 2013-02-12 14:05:22
Message-ID: 1360677922.77784.YahooMailNeo@web162902.mail.bf1.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Sergey Gigoyan <sergey(dot)gigoyan(at)gmail(dot)com> wrote:

> I have function with character varying array as input parameter.

> example
> get_list(IN session_id integer,IN parameters_list character varying[])
>
> How can I call this function (pass array elements to function)?

test=# create or replace function get_list(IN session_id integer,IN parameters_list character varying[])
test-#   returns setof varchar
test-#   language SQL
test-# as $$
test$#   select unnest($2);
test$# $$;
CREATE FUNCTION
test=# select get_list(1, array['asdf','qwerty']);
 get_list
----------
 asdf
 qwerty
(2 rows)

http://www.postgresql.org/docs/9.2/interactive/arrays.html

-Kevin

In response to

  • at 2013-02-12 13:39:06 from Sergey Gigoyan

Browse pgsql-novice by date

  From Date Subject
Next Message Jack Kaufman 2013-02-12 15:05:29 Re: Function name
Previous Message Sergey Gigoyan 2013-02-12 13:39:06