X-Original-To: pgsql-admin@postgresql.org Received: from mailgw1.syncinc.com (mailgw1.syncinc.com [63.126.54.34]) by postgresql.org (Postfix) with ESMTP id 1F8A2475AE5 for ; Mon, 17 Mar 2003 16:20:27 -0500 (EST) Received: from ascwf14yqi3m2t (h000795bff979.ne.client2.attbi.com [24.62.106.235]) by mailgw1.syncinc.com (iPlanet Messaging Server 5.1 (built May 7 2001)) with ESMTPA id <0HBW003RKWL1F5@mailgw1.syncinc.com> for pgsql-admin@postgresql.org; Mon, 17 Mar 2003 16:19:50 -0500 (EST) Date: Mon, 17 Mar 2003 16:22:14 -0500 From: Michael Brusser Subject: Problem with view upgrading from 7.2 to 7.3 To: pgsql-admin@postgresql.org Reply-To: michael@synchronicity.com Message-id: MIME-version: 1.0 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: 7BIT Importance: Normal X-Priority: 3 (Normal) X-MSMail-priority: Normal X-Archive-Number: 200303/278 X-Sequence-Number: 7918 Hi, I am upgrading Postgres from version 7.2.1 to 7.3.2 I use pg_dump (the 7.3.2 version) to dump the old database into the file. I use psql to load it into the new server. Generally it seem to work, but it breaks while attempting to load one view definition. Server complains about nonexistant function - varchar(int), as far as I remember. It appears that some casting is no longer supported. This is the fragment from the dump file that results in error: CREATE VIEW v_note_links AS SELECT note_links_aux.nl_id AS id, note_links_aux.nl_obj_url AS obj_url, ((('sync:///Note/SyncNotes/'::"varchar" || note_links_aux.nt_note_name) || '/'::"varchar") || "varchar"(note_links_aux.nl_note_id)) AS note_url, note_links_aux.nt_note_name AS note_name, note_links_aux.nl_note_id AS note_id, note_links_aux.nt_obj_name AS obj_name, note_links_aux.nl_obj_id AS obj_id FROM note_links_aux; ------------------------------------------ There's no problem if I try to manually create the view in the way it was created in the old database: CREATE VIEW v_note_links AS SELECT nl_id AS id ,nl_obj_url AS obj_url ,'sync:///Note/SyncNotes/' || nt_note_name || '/' || nl_note_id AS note_url ,nt_note_name AS note_name ,nl_note_id AS note_id ,nt_obj_name AS obj_name ,nl_obj_id AS obj_id FROM note_links_aux ; ----------------------------------------------- I would appreciate any help on how to handle this problem. Mike.