Table has type character varying, but query expects character varying

From: Howard Cole <howardnews(at)selestial(dot)com>
To: 'PgSql General' <pgsql-general(at)postgresql(dot)org>
Subject: Table has type character varying, but query expects character varying
Date: 2007-10-30 16:55:50
Message-ID: 47276216.3040804@selestial.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have the following table in a win32 8.2.2 database: (dumped from pgadmin)

CREATE TABLE email_directory
(
email_directory_id serial NOT NULL,
mailbox_id integer NOT NULL,
path character varying(255) NOT NULL,
marked_for_deletion boolean NOT NULL DEFAULT false,
CONSTRAINT email_directory_pkey PRIMARY KEY (email_directory_id),
CONSTRAINT email_directory_mailbox_id_fkey FOREIGN KEY (mailbox_id)
REFERENCES mailbox (mailbox_id) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE CASCADE
)
WITHOUT OIDS;

ALTER TABLE email_directory OWNER TO postgres;
GRANT ALL ON TABLE email_directory TO postgres;

CREATE UNIQUE INDEX email_directory_mailbox_id_path_idx
ON email_directory
USING btree
(mailbox_id, lower(path::text));

I have the following row in the table:

56, 4,'/Demo', f

When I try the following query I get the error below.

update email_directory set path='/Something else' where
email_directory_id=56

ERROR: attribute 3 has wrong type
SQL state: XX000
Detail: Table has type character varying, but query expects character
varying.

What has gone wrong?

Howard
www.selestial.com

Responses

Browse pgsql-general by date

  From Date Subject
Next Message M Rather 2007-10-30 17:01:15 Re: pgsql.broken.csc
Previous Message Yves Moisan 2007-10-30 16:49:19 PG windows service issues