Search Postgresql Archives

Table has type character varying, but query expects character varying

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
      choose an index scan if your joining column's datatypes do not
      match

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux