Bad timestamp external representation - Mailing list pgsql-general

From Mark Tessier
Subject Bad timestamp external representation
Date
Msg-id 20030428164554.6165d41b.m_tessier@sympatico.ca
Whole thread Raw
Responses Re: Bad timestamp external representation  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
List pgsql-general
Hi,

When I try to insert with the "current" constant, as in:

herboris=> INSERT INTO cart (cartid, clientid, invdate, paydate) VALUES
herboris-> (4469858, 2, 'current_timestamp', 'now');

I get the following message:

ERROR:  Bad date external representation 'current_timestamp'

This is how my table is set up:

/* --------------------------------------------------------
  Table structure for table "cart"
-------------------------------------------------------- */
CREATE TABLE "cart" (
   "cartid" int8 NOT NULL,
   "clientid" varchar(8) NOT NULL,
   "packnum" varchar(20),
   "shipcost" numeric(5,2),
   "prepinit" varchar(2),
   "order_by" varchar(12),
   "paytype" varchar(20),
   "invdate" date NOT NULL,
   "paydate" date,
   CONSTRAINT "cart_pkey" PRIMARY KEY ("cartid")
);
GRANT ALL ON "cart" TO "apache";
GRANT ALL ON "cart" TO "mark";

ALTER TABLE "cart" ALTER COLUMN "invdate" SET DEFAULT 'now';

I changed "paytype" to type "timestamp" and that didn't work either. Could someone please tell me what "Bad external
representation"means, and hopefully what I'm doing wrong. 

--
Thanks,

Mark


pgsql-general by date:

Previous
From: "Johnson, Shaunn"
Date:
Subject: set passwd for users
Next
From: "scott.marlowe"
Date:
Subject: Re: set passwd for users