Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

join table which column type integer []

Status
Not open for further replies.

JJJ777

Programmer
Jun 5, 2002
33
0
0
MY
hi..alll

how to join this 2 postgress tables..?
my purpose is to display every user with their roles..

i tried use this( just try an error) :-

select * from pg_group inner join pg_shadow ON pg_group.grolist::text = pg_shadow.usesysid
my problem is on type integer[] how to join it..?


table :pg_group

groname | grosysid | grolist
------------------+----------+-----------
warden | 105 | {}
pensyarah | 108 | {101,110}
pensyarah_warden | 112 | {101,111}
staff | 109 | {101}
admin | 110 | {101,113}

table : pg_shadow
usename | usesysid | usecreatedb | usesuper | usecatupd | passwd | valuntil | useconfig
---------+----------+-------------+----------+-----------+-------------------------------------+----------+-----------
pgsql | 1 | t | t | t | | |
aniza | 110 | f | f | f | md57bd2a67985cdab2f14a2a4e5db507caa | |
amar | 111 | f | f | f | md599860c90dbc3dd495f1afed48215adc3 | |
zaiton | 113 | t | t | t | md5835f34b2de3d74fe6f8d77421dcac8e4 | |
(4 rows)


tq in advance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top