How to manage category-ids as array-fields ? - Mailing list pgsql-sql

From Andreas
Subject How to manage category-ids as array-fields ?
Date
Msg-id 48529A25.1050808@gmx.net
Whole thread Raw
Responses Re: How to manage category-ids as array-fields ?
List 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 by date:

Previous
From: Volkan YAZICI
Date:
Subject: Re: Create Table Problem
Next
From: novice
Date:
Subject: Results with leading zero