[GENERAL] INSERT a real number in a column based on other columns OLD INSERTs

2015-06-24 Thread litu16
In PostgreSQL I have this table... (there is a primary key serial column in the most left side stmtserial which is not shown in this image) http://postgresql.nabble.com/file/n5854916/screenshot.jpg in the table above, all columns are entered via querrys, except the time_index which I is

Re: [GENERAL] INSERT a real number in a column based on other columns OLD INSERTs

2015-06-24 Thread Adrian Klaver
On 06/23/2015 11:20 PM, litu16 wrote: In PostgreSQL I have this table... (there is a primary key serial column in the most left side stmtserial which is not shown in this image) http://postgresql.nabble.com/file/n5854916/screenshot.jpg in the table above, all columns are entered via querrys,

Re: [GENERAL] INSERT a real number in a column based on other columns OLD INSERTs

2015-06-24 Thread David G. Johnston
On Wed, Jun 24, 2015 at 5:52 PM, Adrian Klaver adrian.kla...@aklaver.com wrote: On 06/23/2015 11:20 PM, litu16 wrote: So, this is what I have made so far... *CREATE OR REPLACE FUNCTION timelog() RETURNS trigger AS $BODY$ DECLARE t_ix real; n int;