Search Postgresql Archives

Dynamic column name troubles

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

 




I have a table that gets a column added to it for every insert on another table.
 the general form of these columns are g_c_i_avg where i is the unique
identifyer for the insert that caused the column to be added. I need to use this
column to calculate a new value for another column in the same table on an
update to that column.  I can find the altered column, and even build a text
string for it: something like column := ''NEW.g_c_'' || 7 || ''_avg'';

but then i can't use the double precision value for that column.  Any help would
be appreciated.

matt

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to majordomo@xxxxxxxxxxxxxx)

[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