Constraints for grouping
| От | PostgreSQL Admin |
|---|---|
| Тема | Constraints for grouping |
| Дата | |
| Msg-id | 46DC5309.8090604@productivitymedia.com обсуждение исходный текст |
| Ответ на | Re: pg & Delphi (sergio carrasco <a882sacl@yahoo.com.ar>) |
| Ответы |
Re: Constraints for grouping
|
| Список | pgsql-sql |
I have a question that I've thought in my head about using triggers, but
I figure to ask people that do SQL more than I. So, I have a table that
I want two columns.
(1) A featured column which is for only 1 row, once it switched to
another row than all other rows must be false
title | author_id | categories | featured
--------------------------------+-----------+------+-----Thierry Beta Release | 3 | 11 |
TrueDifferentApproach | 3 | 11 |Ottawa Does Not Heart Hip-Hop | 3 | 11 |
(2) A featured column by category and only allow category_feature equal
to the number of categories.
Is SQL the way to go (and how - ideas), or should I use python for the
heavy lifting?
Thanks for any input,
J
В списке pgsql-sql по дате отправления: