Re: [GENERAL] pl/pgsql loop thru columns names

2009-08-21 Thread Scott Bailey
Dilyan Berkovski wrote: Hi All, I have a nasty table with many repeating columns of the kind port_ts_{i}_, where {i} is from 0 to 31, and could be 3 different words. I have made a pl/pgsql function that checks those columns from port_ts_1_status to port_ts_31_status and counts something, howe

Re: [GENERAL] pl/pgsql loop thru columns names

2009-08-19 Thread Pavel Stehule
2009/8/19 Dilyan Berkovski : > Hi All, > > I have a nasty table with many repeating columns of the kind > port_ts_{i}_, where {i} is from 0 to 31, and could be > 3 different words. > I have made a pl/pgsql function that checks those columns from > port_ts_1_status to port_ts_31_status and count

[GENERAL] pl/pgsql loop thru columns names

2009-08-18 Thread Dilyan Berkovski
Hi All, I have a nasty table with many repeating columns of the kind port_ts_{i}_, where {i} is from 0 to 31, and could be 3 different words. I have made a pl/pgsql function that checks those columns from port_ts_1_status to port_ts_31_status and counts something, however this is nasty and ugl