Re: Need help to dynamically access to colomns in function!
От | David Fetter |
---|---|
Тема | Re: Need help to dynamically access to colomns in function! |
Дата | |
Msg-id | 20081217214530.GG6793@fetter.org обсуждение исходный текст |
Ответ на | Need help to dynamically access to colomns in function! ("Иван Марков" <aesthete2005@gmail.com>) |
Список | pgsql-general |
On Tue, Dec 16, 2008 at 11:37:17PM +0300, Иван Марков wrote: > Hello. I have table classif with columns: > ... , group1, group2, group3, ... , group48, ... That's a very poor design because it's both denormalized and has very poor naming. There are likely plenty of other things wrong with it, too. Check http://thedailywtf.com/ for systems similar to yours. I suspect it won't take long to find some. > In function i do query and want run on every row and dynamically > operate on columns from group1 to group20. I do something like this: Nothing will really help until you fix your design, and dynamic querying will only lead you further down this rat-hole. The answer to, "how do I shoot myself in the foot?" is "Don't." Cheers, David. -- David Fetter <david@fetter.org> http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfetter XMPP: david.fetter@gmail.com Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate
В списке pgsql-general по дате отправления: