Re: timestamp error

From: "Colin Gillespie" <C(dot)Gillespie(at)newcastle(dot)ac(dot)uk>
To: "Robert Morgan" <robert_(at)ihug(dot)co(dot)nz>, "postgres" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: timestamp error
Date: 2004-05-21 07:12:48
Message-ID: 20DA376D0C991745A4D5249F7BCD7A2521B388@largo.campus.ncl.ac.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi Bob,

In my tables I just have a default value of now() for my time.
So
CREATE TABLE t1(
c1 text,
time timestamp NOT NULL DEFAULT now()
);

Insert into t1 values ('a');

Colin

>-----Original Message-----
>From: pgsql-novice-owner(at)postgresql(dot)org
>[mailto:pgsql-novice-owner(at)postgresql(dot)org] On Behalf Of Robert Morgan
>Sent: 20 May 2004 22:56
>To: postgres
>Subject: [NOVICE] timestamp error
>
>
>Hi I have a form that inserts data to the DB. One field is timestamp
>type this field is not always filled out but postgres wont
>accept '' or
>null and gives the error (or maybe php gives the error)..
>
>query failed: ERROR: Bad timestamp external representation '' in....
>
>any ideas appreciated
>
>Bob
>
>
>---------------------------(end of
>broadcast)---------------------------
>TIP 1: subscribe and unsubscribe commands go to
>majordomo(at)postgresql(dot)org
>

Browse pgsql-novice by date

  From Date Subject
Next Message hendro 2004-05-21 07:49:41 New from mssql. Help please
Previous Message joseph speigle 2004-05-21 04:55:36 Re: timestamp error