
July 14th, 2003, 02:42 PM
|
 |
Me likey breadsticks...
|
|
Join Date: Jan 2003
Location: Los Angeles
|
|
|
Hey Joe,
First off are you sure you want to set your tables up like that?
Wouldn't it be better to have
pid_table:
pid | name
tid_table:
tid | pid
This way you won't be limited to only 3 pids for each tid.
Then you can just do a SELECT tid, name FROM pid_table, tid_table WHERE pid_table.pid = tid_table.pid .
If you want to limit the max number of matches for pids to tids you can use a plpgsql function to enforce this.
HTH
-b
**EDIT**
Hmm, looking at your question again, I'm not sure if I addressed it correctly, if not please let me know and just restate what you're asking so I can understand it better.
__________________
PostgreSQL, it's what's for dinner...
Last edited by bcyde : July 14th, 2003 at 02:44 PM.
|