Using Array in Function

From: Günce Kaya <guncekaya14(at)gmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Using Array in Function
Date: 2017-10-09 19:40:34
Message-ID: CAAV2-mX-qXmcWaBjQYC-h3kFrqE4LObbh6WDefyeMy+PZAqwVw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hello,

I came across something strange about function. I have a function that has
an input parameter is an array like integer[] and return json value. This
input parameter is used in where clause.

When I call function I'm using input parameter like '{int1,int2,int3}' then
return only result for first one int1. If I only execute sql script that is
in function with same parameter in where clause, sql script return 3 rows
that we need.

It seems so weird. Both of results should be same for function and sql
script of function.

What do you think about that? If you need I can share base of function
structure.

Regards,
Gunce Kaya

Linkedin <https://tr.linkedin.com/in/guncekaya> - Twitter
<https://twitter.com/gguncesi> - Blog
<http://www.guncekaya.blogspot.com.tr/>

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message David G. Johnston 2017-10-09 20:12:21 Re: Using Array in Function
Previous Message Rene Romero Benavides 2017-10-06 03:10:50 Re: Get relation name form relids in postgresql