Re: Why does this array query fail?

From: bricklen <bricklen(at)gmail(dot)com>
To: Ken Tanzer <ken(dot)tanzer(at)gmail(dot)com>
Cc: PG-General Mailing List <pgsql-general(at)postgresql(dot)org>
Subject: Re: Why does this array query fail?
Date: 2013-09-17 01:07:06
Message-ID: CAGrpgQ_fT9pV_0Xx72p=3SqjyqydA3nu+ZLN3ysC0GXj3yk0Hg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Sep 16, 2013 at 5:32 PM, Ken Tanzer <ken(dot)tanzer(at)gmail(dot)com> wrote:

> SELECT 'found' WHERE 'test' = ANY( (SELECT ARRAY['test','pass','fail']) );
>

It works if you drop the inner SELECT.

SELECT 'found' WHERE 'test' = ANY( ARRAY['test','pass','fail'] );

In response to

Browse pgsql-general by date

  From Date Subject
Next Message John R Pierce 2013-09-17 01:09:14 Re: using Replace funcion in postgresql
Previous Message Ken Tanzer 2013-09-17 00:32:05 Why does this array query fail?