Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-novice by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group