Search Postgresql Archives

Re: Need help to dynamically access to colomns in function!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter@xxxxxxxxx

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux