Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 834E364FCBC for ; Mon, 29 Dec 2008 00:17:26 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 52191-04 for ; Mon, 29 Dec 2008 00:17:23 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.kulmacet.com (static-71-244-46-202.dllstx.fios.verizon.net [71.244.46.202]) by mail.postgresql.org (Postfix) with ESMTP id 602EA64FC4C for ; Mon, 29 Dec 2008 00:17:22 -0400 (AST) Received: (qmail 14947 invoked by uid 509); 28 Dec 2008 22:17:18 -0600 Received: from 172.16.1.96 by mail.kulmacet.com (envelope-from , uid 507) with qmail-scanner-1.25-st-qms (clamdscan: 0.87/3517. spamassassin: 3.0.2. perlscan: 1.25-st-qms. Clear:RC:0(172.16.1.96):SA:0(-5.9/5.0):. Processed in 1.027121 secs); 29 Dec 2008 04:17:18 -0000 X-Antivirus-MYDOMAIN-Mail-From: kulmacet101@kulmacet.com via mail.kulmacet.com X-Antivirus-MYDOMAIN: 1.25-st-qms (Clear:RC:0(172.16.1.96):SA:0(-5.9/5.0):. Processed in 1.027121 secs Process 14937) Received: from unknown (HELO webmail.kulmacet.com) (kulmacet101@kulmacet.com@172.16.1.96) by mail.kulmacet.com with SMTP; 28 Dec 2008 22:17:17 -0600 Received: from 172.16.1.188 (SquirrelMail authenticated user kulmacet101@kulmacet.com) by webmail.kulmacet.com with HTTP; Sun, 28 Dec 2008 22:17:14 -0600 (CST) Message-ID: <13f61b6746f3518943cc921d039e9b70.squirrel@webmail.kulmacet.com> In-Reply-To: <49584E7C.6090409@kulmacet.com> References: <49584E7C.6090409@kulmacet.com> Date: Sun, 28 Dec 2008 22:17:14 -0600 (CST) Subject: Re: You might need to add explicit type casts. From: kulmacet101@kulmacet.com To: "Andrew McMillan" Cc: pgsql-php@postgresql.org User-Agent: SquirrelMail/1.4.17 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200812/9 X-Sequence-Number: 3943 Thank you for the quick response. I also found that the WHERE statements were not properly quoted, a 101 mistake. WHERE id = 469 => WHERE id = '469' The update seems to be working as expected. kulmacet > On Sun, 2008-12-28 at 21:30 -0600, kulmacet101@kulmacet.com wrote: >> I have a table running on Linux\Postgresql 8.3.4: >> >> CREATE TABLE "public"."active_sessions" ( >> "id" VARCHAR(11) DEFAULT nextval('id_seq'::regclass) NOT NULL, >> "browser_type" VARCHAR(100), >> "session_id" VARCHAR(50), >> "ip_address" INET, >> "username" VARCHAR(50), >> "access_time" TIMESTAMP WITHOUT TIME ZONE, >> "user_rand" VARCHAR(15), >> "user_activity" TIMESTAMP WITHOUT TIME ZONE, >> CONSTRAINT "active_sessions_pkey" PRIMARY KEY("id") >> ) WITHOUT OIDS; >> >> I can insert the TIMESTAMP('s) into this table without issue but when I >> update the new entry the following error is received: > > Hi, > > You need to: > > UPDATE active_sessions SET access_time = '12/28/2008 8:51:33PM'::timestamp > without time zone WHERE id = 469 > > or alternatively: > > UPDATE active_sessions SET access_time = current_timestamp::timestamp > without time zone WHERE id = 469 > > I'm surprised that: > > UPDATE active_sessions SET access_time = current_timestamp WHERE id = 469 > > doesn't also work fine though - it should cast timestamp => timestamp > without time zone without any trouble. > > Cheers, > Andrew. > > ------------------------------------------------------------------------ > andrew (AT) morphoss (DOT) com +64(272)DEBIAN > You fill a much-needed gap. > ------------------------------------------------------------------------ > > >