X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 70D61DA25F for ; Sat, 15 Oct 2005 05:49:17 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 41945-02 for ; Sat, 15 Oct 2005 08:49:12 +0000 (GMT) Received: from hotmail.com (bay108-f25.bay108.hotmail.com [65.54.162.35]) by svr1.postgresql.org (Postfix) with ESMTP id 9B110DA21B for ; Sat, 15 Oct 2005 05:49:13 -0300 (ADT) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Sat, 15 Oct 2005 01:49:15 -0700 Message-ID: Received: from 65.54.162.200 by by108fd.bay108.hotmail.msn.com with HTTP; Sat, 15 Oct 2005 08:49:15 GMT X-Originating-IP: [84.222.62.247] X-Originating-Email: [paperinik_100@hotmail.com] X-Sender: paperinik_100@hotmail.com From: "paperinik 100" To: pgsql-sql@postgresql.org Subject: problems with array Date: Sat, 15 Oct 2005 08:49:15 +0000 Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed X-OriginalArrivalTime: 15 Oct 2005 08:49:15.0804 (UTC) FILETIME=[529FE5C0:01C5D165] X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=4.305 required=5 tests=[DNS_FROM_RFC_ABUSE=0.374, DNS_FROM_RFC_POST=1.376, FROM_ENDS_IN_NUMS=0.516, MSGID_FROM_MTA_HEADER=0, RCVD_IN_BL_SPAMCOP_NET=1.832, UPPERCASE_25_50=0.207] X-Spam-Level: **** X-Archive-Number: 200510/190 X-Sequence-Number: 23043 PostgreSQL is 7.4.7. My first table CREATE TABLE tb_cat ( id INTEGER, desc text ); INSERT INTO tb_cat VALUES (10, 'cat10'); INSERT INTO tb_cat VALUES (20, 'cat20'); INSERT INTO tb_cat VALUES (30, 'cat30'); My second table CREATE TABLE tb_array( id INTEGER, cat INTEGER[] ); INSERT INTO tb_array VALUES(1, ARRAY [10, 20]); When I write my select SELECT * from tb_cat WHERE id IN (SELECT cat FROM tb_array WHERE id=1); the output is: ERROR: operator does not exist: integer = integer[] HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts. Can anyone help me? thanks.