Re: [GENERAL] Array value from table as parameter

2016-07-22 Thread Jim Nasby
On 7/22/16 7:31 AM, Charles Clavadetscher wrote: I need to pass an array as a parameter in a function, but it is a part of a trigger that get a "new" value. > > I've tested it like > > select function_x(1,55,array[['x'],['y']]) > or > select function_x(1,55,array[['x'

Re: [GENERAL] Array value from table as parameter

2016-07-22 Thread Charles Clavadetscher
Hello > From: pgsql-general-ow...@postgresql.org > [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Aislan Luiz Wendling > Sent: Mittwoch, 20. Juli 2016 19:17 > To: pgsql-general@postgresql.org > Subject: [GENERAL] Array value from table as parameter > > Hi, > &

Re: [GENERAL] Array value from table as parameter

2016-07-21 Thread David G. Johnston
On Wed, Jul 20, 2016 at 1:17 PM, Aislan Luiz Wendling < aislanl...@hotmail.com> wrote: > > it doesn't work, as the value comes like this: {"x","y"} > > ​SELECT '{"x","y"}'::text[] = array['x','y']::text[]; -- TRUE David J.

[GENERAL] Array value from table as parameter

2016-07-21 Thread Aislan Luiz Wendling
Hi, I need to pass an array as a parameter in a function, but it is a part of a trigger that get a "new" value. I've tested it like select function_x(1,55,array[['x'],['y']]) orselect function_x(1,55,array[['x','y']]) and it worked. But if I use select functio