X-Original-To: pgsql-sql@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 71588476479 for ; Tue, 6 May 2003 04:54:54 -0400 (EDT) Received: from matrix.gatewaynet.com (unknown [217.19.69.50]) by postgresql.org (Postfix) with ESMTP id 4F9A947646C for ; Tue, 6 May 2003 04:54:52 -0400 (EDT) Received: from matrix.gatewaynet.com (localhost [127.0.0.1]) by matrix.gatewaynet.com (8.12.5/8.12.5) with ESMTP id h46DuJ1s022068; Tue, 6 May 2003 11:56:19 -0200 Received: from localhost (achill@localhost) by matrix.gatewaynet.com (8.12.5/8.12.5/Submit) with ESMTP id h46DuIDh022064; Tue, 6 May 2003 11:56:19 -0200 Date: Tue, 6 May 2003 11:56:18 -0200 (GMT+2) From: Achilleus Mantzios To: "Mr.F" Cc: pgsql-sql@postgresql.org Subject: Re: Cast type int2vector/array_field to character In-Reply-To: <000801c313a6$12b02b20$de00a8c0@fhf> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Status: No, hits=-38.6 required=5.0 tests=BAYES_01,EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT, QUOTE_TWICE_1,REPLY_WITH_QUOTES,SIGNATURE_LONG_DENSE, USER_AGENT_PINE autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200305/72 X-Sequence-Number: 13237 On Tue, 6 May 2003, Mr.F wrote: > Forgiveness if have been asked previously. > > Simple question: > 1. How can I cast type int2vector/array_field into character? > 2. My case like this: I have 2 table, > first table: > > Field1 Field2 > ====== ====== > 1 aaaaa > 2 bbbbb > 3 ccccc > 4 ddddd > 5 eeeee > > second table: (only one field) > > Array_Integer > ============= > 1 2 4 > > Wishing to be yielded from relationship both of that: > > Result > ====== > aaaaa > bbbbb > ddddd > > How command of SQL to get that result? > > exist in my mind now: "select * from table1 where field1 in (select > Array_Integer from table2". :) look at contrib/intarray package. > > Thanks in advance, > Fadjar Hamidi > > > ---------------------------(end of broadcast)--------------------------- > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org > -- ================================================================== Achilleus Mantzios S/W Engineer IT dept Dynacom Tankers Mngmt Nikis 4, Glyfada Athens 16610 Greece tel: +30-210-8981112 fax: +30-210-8981877 email: achill@matrix.gatewaynet.com mantzios@softlab.ece.ntua.gr