Bad timestamp external representation

From: Mark Tessier <m_tessier(at)sympatico(dot)ca>
To: pgsql-general(at)postgresql(dot)org
Subject: Bad timestamp external representation
Date: 2003-04-28 20:45:54
Message-ID: 20030428164554.6165d41b.m_tessier@sympatico.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message scott.marlowe 2003-04-28 20:50:43 Re: set passwd for users
Previous Message Johnson, Shaunn 2003-04-28 20:34:58 set passwd for users