storing record-array in varchar?

From: <me(at)alternize(dot)com>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: storing record-array in varchar?
Date: 2006-01-12 23:11:40
Message-ID: 04ba01c617cd$8c1db710$2201a8c0@iwing
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

hi list

how can something like this be achieved:

UPDATE mytable SET m_list = (SELECT DISTINCT s_id FROM sometable WHERE s_id > 6000) WHERE m_id = 10;

the field m_list would then hold something like '6001, 6002, 6003, 7000', which ideally i could later use for something like SELECT * FROM sometable JOIN mytable WHERE s_id IN m_list AND m_id = 10;

field m_list would idealy be a varchar if possible...

thanks,
thomas

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Michael Fuhr 2006-01-13 00:58:57 Re: storing record-array in varchar?
Previous Message operationsengineer1 2006-01-12 20:57:30 Re: Sort of Complex Query - Howto Eliminate Repeating Results