Problem with null timestamp fields - Mailing list pgsql-general

From Thomas T. Veldhouse
Subject Problem with null timestamp fields
Date
Msg-id 006801c0ff7a$f0a19c30$0101a8c0@cascade
Whole thread Raw
Responses Re: Problem with null timestamp fields  (GH <grasshacker@over-yonder.net>)
Re: Problem with null timestamp fields  (Jason Earl <jdearl@yahoo.com>)
List pgsql-general
Here is the table I have.

CREATE TABLE "user_history" (
        "id" integer DEFAULT nextval('"user_history_id_seq"'::text) NOT
NULL,
        "userid" integer NOT NULL,
        "ipaddr" character(15) NOT NULL,
        "login_ts " timestamp with time zone,
        "logout_ts " timestamp with time zone,
        Constraint "user_history_pkey" Primary Key ("id")
);


I try this:

insert into user_history(id, userid, ipaddr, login_ts)
values (1, 2, '127.0.0.1', now())

And I get this:

PostgreSQL said: ERROR: Relation 'user_history' does not have attribute
'login_ts'

Obviously, I DO have login_ts.  The field is nullable, so why the headache?

Thanks in advance,

Tom Veldhouse
veldy@veldy.net


pgsql-general by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: Why is NULL not indexable?
Next
From: GH
Date:
Subject: Re: Problem with null timestamp fields