Re: Fwd: Re: [GENERAL] Dynamic update of a date field

2012-02-16 Thread Steve Crawford
On 02/16/2012 02:45 PM, John R Pierce wrote: On 02/16/12 2:34 PM, David Salisbury wrote: Would it not be advantageous to replicate information in the above form if you wanted to, say, get all records in the month of May, and therefore create an index on the month field? I would think that woul

Re: Fwd: Re: [GENERAL] Dynamic update of a date field

2012-02-16 Thread John R Pierce
On 02/16/12 2:34 PM, David Salisbury wrote: Would it not be advantageous to replicate information in the above form if you wanted to, say, get all records in the month of May, and therefore create an index on the month field? I would think that would be more efficient than creating a functional

Fwd: Re: [GENERAL] Dynamic update of a date field

2012-02-16 Thread David Salisbury
On 2/16/12 7:27 AM, Andreas Kretschmer wrote: Musial, Jan (GIUB) wrote: smallint,month smallint,day smallint,time_stamp date); I would like to That's silly, use one (and only one) field, timestamp (or timestamptz) Don't use never ever multiple columns for the same information! Would it no

Re: [GENERAL] Dynamic update of a date field

2012-02-16 Thread Musial, Jan (GIUB)
amic update of a date field On Thursday, February 16, 2012 6:05:40 am Musial, Jan (GIUB) wrote: > Dear all, > > I have a question concerning default value/trigger function which supposed > to update/fill field called time_stamp whenever a row is inserted. Let say > that we have a table:

Re: [GENERAL] Dynamic update of a date field

2012-02-16 Thread Adrian Klaver
On Thursday, February 16, 2012 6:05:40 am Musial, Jan (GIUB) wrote: > Dear all, > > I have a question concerning default value/trigger function which supposed > to update/fill field called time_stamp whenever a row is inserted. Let say > that we have a table: CREATE TABLE dummy (year smallint,mont

Re: [GENERAL] Dynamic update of a date field

2012-02-16 Thread Andreas Kretschmer
Musial, Jan (GIUB) wrote: > Dear all, > > I have a question concerning default value/trigger function which > supposed to update/fill field called time_stamp whenever a row is > inserted. Let say that we have a table: CREATE TABLE dummy (year you can use 'default now()' or an insert-trigger >