Cast type int2vector/array_field to character - Mailing list pgsql-sql

From Mr.F
Subject Cast type int2vector/array_field to character
Date
Msg-id 000801c313a6$12b02b20$de00a8c0@fhf
Whole thread Raw
In response to Re: 2 simple SQL questions: optimizing aggegate query  (Bruno Wolff III <bruno@wolff.to>)
Responses Re: Cast type int2vector/array_field to character
List pgsql-sql
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". :)

Thanks in advance,
Fadjar Hamidi



pgsql-sql by date:

Previous
From: Rajesh Kumar Mallah
Date:
Subject: Re: mnogosearch examples
Next
From: Achilleus Mantzios
Date:
Subject: Re: Cast type int2vector/array_field to character