| From: | Ranjan Kumar Baisak <rbaisak(at)nyc(dot)yamaha(dot)com> |
|---|---|
| To: | "Decibel!" <decibel(at)decibel(dot)org> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Function with Integer array parameter |
| Date: | 2007-08-16 16:06:24 |
| Message-ID: | 46C47600.1080907@nyc.yamaha.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Decibel! wrote:
> On Thu, Aug 16, 2007 at 11:14:25AM -0400, Ranjan Kumar Baisak wrote:
>
>> Postgres Gurus,
>> Please suggest me what is wrong with this
>> function.
>> This function tries to retrieve set of rows from description table based
>> on set of ID fields passed as array.
>>
>> The error, I get is : ERROR: only one AS item needed for language "plpgsql"
>>
>> CREATE OR REPLACE function get_description_list(integer[]) RETURNS SETOF
>> type_description AS
>> 'DECLARE
>>
> ...
>
>> WHERE d_base.id in array_to_string(ints_desc_ids alias,',')
>>
>
> Note the quotes.
>
> Use dollar quoting... it$$s your friend.
>
I tries wir $$ as well as ''(two single quotes instead of one single
quote) but still got the same error.
I think the error is with
WHERE d_base.id in array_to_string(ints_desc_ids alias,',').
I need a way using integer array in where clause.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Rainer Bauer | 2007-08-16 16:28:58 | Re: Yet Another COUNT(*)...WHERE...question |
| Previous Message | Brad Nicholson | 2007-08-16 16:05:47 | Re: I get a error msg when i try to connect to the DB |