You might need to add explicit type casts.

From: kulmacet101(at)kulmacet(dot)com
To: pgsql-php(at)postgresql(dot)org(dot)
Subject: You might need to add explicit type casts.
Date: 2008-12-29 03:30:05
Message-ID: 9357e6cdeccf06da015ea1534503b877.squirrel@webmail.kulmacet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php

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:

ERROR: operator does not exist: character varying = integer at character
75
HINT: No operator matches the given name and argument type(s). You might
need to add explicit type casts.
STATEMENT: UPDATE active_sessions SET access_time = '12/28/2008 8:51:33
PM' WHERE id = 469

I have read several archives describing the 8.3 release notes and CASTing
but I do not understand how to apply this information, this issue makes no
sense. Insert = ok, Update = "BOOM!".

I have tried this statement with CURRENT_TIMESTAMP, now() but neither
works.

This statement is created using PHP 5.2.6 on a Linux server using PDO and
prepared statements

Any help with this issue is appreciated.

Thanks in advance,
Kulmacet

Responses

Browse pgsql-php by date

  From Date Subject
Next Message Andrew McMillan 2008-12-29 04:07:25 Re: You might need to add explicit type casts.
Previous Message jeroen 2008-12-02 22:22:17 Re: Enabling Multibyte in postgresql / drupal Mac OS X Leopard stack