Problems with default date and time - Mailing list pgsql-sql

From Hutton, Rob
Subject Problems with default date and time
Date
Msg-id 11EFC736FB68D111B9DD00805FAD7C6D1E0C35@plymartpdc.internal.plymart.com
Whole thread Raw
List pgsql-sql
<p><font size="2">  I have created a table with date and time fields by using what I read as being the correct default
statements,but I get the date and time the DB was created at each insert instead of the current date and
time.</font><p><fontsize="2">+----------------------------------+----------------------------------+-------+</font><br
/><fontsize="2">|              Field               |              Type                | Length|</font><br /><font
size="2">+----------------------------------+----------------------------------+-------+</font><br/><font size="2">|
ord_id                          | int4 not null default nextval (  |     4 |</font><br /><font size="2">|
req_id                          | int4 not null default nextval (  |     4 |</font><br /><font size="2">|
ord_description                 | varchar()                        |  1500 |</font><br /><font size="2">|
ord_priority                    | varchar()                        |  1500 |</font><br /><font size="2">|
ord_pri_order                   | int4                             |     4 |</font><br /><font size="2">|
ord_time                        | time default text 'now'          |     8 |</font><br /><font size="2">|
ord_date                        | date default text 'now'          |     4 |</font><br /><font size="2">|
ord_timestamp                   | timestamp default text 'now'     |     4 |</font><br /><font size="2">|
ord_tech                        | varchar()                        |  1500 |</font><br /><font size="2">|
ord_stat                        | varchar()                        |     2 |</font><br /><font size="2">|
ord_notes                       | varchar()                        |  1500 |</font><br /><font size="2">|
ord_whse                        | int4                             |     4 |</font><br /><font
size="2">+----------------------------------+----------------------------------+-------+</font><br/><p><font
size="2">Theinsert statements for the following records were executed about 30 seconds apart.</font><p><font
size="2">|09:34:22|08-13-1999|1999-08-1309:34:22-04|test3   |        |        |    96|    95|           |           
|</font><br/><font size="2">|09:34:22|08-13-1999|1999-08-13 09:34:22-04|test4   |        |        |    97|   
96|          |            |</font><br /><font size="2">|09:34:22|08-13-1999|1999-08-13 09:34:22-04|test4   |       
|       |</font><br /><p><font size="2">[PostgreSQL 6.5.0 on i686-pc-linux-gnu, compiled by gcc egcs-2.91.66] on Redhat
Linux6.0, Kernel 2.2.10</font><p><font size="2">Thanks in advance for the help,</font><br /><font size="2">Rob</font> 

pgsql-sql by date:

Previous
From: Bart Ogryczak
Date:
Subject: Re: [SQL] Searching Text Fields - Case Sensitive?
Next
From: Patrik Kudo
Date:
Subject: Re: [SQL] Problems with default date and time