How to manage category-ids as array-fields ?
От | Andreas |
---|---|
Тема | How to manage category-ids as array-fields ? |
Дата | |
Msg-id | 48529A25.1050808@gmx.net обсуждение исходный текст |
Ответы |
Re: How to manage category-ids as array-fields ?
|
Список | pgsql-sql |
Hi, I get from an outside source tables as simple textfiles to import. Those are obviously results of views with joined tables. Among the normal stuff are columns that have one or a list of id-numbers devided by a semicolon. In the next column there is the corresponding text for this ids. It looks like this: 17, ... , "1; 2;", "cat; mouse;", ... 23, ..., "3;", "dog;", ... 42, ..., "2; 7;", "mouse; horse;", ... Obviously the meaning is that some entity has those listed attributes. Most likely they are stored as a n:m-relation like: 17, 1 17, 2 23, 3 42, 2 42, 7 Is there a way to reproduce the output in the form above (as array) ? Is there a way to import the data in the form above, so it gets neately stored in a n:m ? Is it seen as a conceptual good solution to store such information within a text-column or array? I'd rather doubt that PG would watch the integrity of those ids then.
В списке pgsql-sql по дате отправления: