Re: Set Operators and Arrays Question
От | Stephan Szabo |
---|---|
Тема | Re: Set Operators and Arrays Question |
Дата | |
Msg-id | Pine.BSF.4.21.0103011116430.47142-100000@megazone23.bigpanda.com обсуждение исходный текст |
Ответ на | Set Operators and Arrays Question (Geoff Russell <geoff@austrics.com.au>) |
Список | pgsql-general |
> Wish List Solution: > > Heres what I think would be really the best way to solve the problem. > > create table member ( member_id serial, data text); > create table mailing ( mailing_id serial, name text); > create table memb_mailing ( member_id int,mailings int[]); > > Here the initial mailings array is empty and I say things like: > > update memb_mailing add 27 into mailings > where member_id=templist.member_id; > > This just inserts the letter number 27 into the mailings array. And we could > also say things like: > > select M.member_id from member M,memb_mailing MM > where M.member_id=MM.member_id and > MM.mailings contains 27; You may want to look at the contrib/array directory for additional functions and operators for arrays (which includes is this an element of this array function/operator)
В списке pgsql-general по дате отправления: