How can I assign a multiple-field-function result on PostgreSQL updates -


i'm looking optimized method in postgresql that:

update table1 set (a,b)=(somecomplexfunction(table1.something),2*somecomplexfunction(table1.something))  ... 

this calculates somecomplexfunction(table1.something) twice, i'd that:

update table1 set (a,b)=somecomplexvectorfunction(table1.something) ... 

but update syntax not support multiple field functions. ideas?

update table1 set     = somecomplexfunction(table1.something),     b = * 2 ... 

Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -