On May 8, 2007, at 3:29 AM, PFC wrote:
Create a table which contains your list of loggers (since it's good normalization anyway, you probably have it already) and have your data table's logger_id REFERENCE it

BTW, you could do that dynamically with a subselect: (SELECT DISTINCT logger_id FROM data) AS loggers, though I'm not sure how optimal the plan would be.

BTW, I encourage you to not use 'id' as a field name; I've found it makes doing things like joins a lot trickier. Easier to just make every id field the same (logger_id in this case).
--
Jim Nasby                                            [EMAIL PROTECTED]
EnterpriseDB      http://enterprisedb.com      512.569.9461 (cell)



---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply via email to