Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id F3F534759AF for ; Thu, 7 Nov 2002 07:22:24 -0500 (EST) Received: from hotmail.com (f21.sea1.hotmail.com [207.68.163.21]) by postgresql.org (Postfix) with ESMTP id 632E1475461 for ; Thu, 7 Nov 2002 07:22:24 -0500 (EST) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Thu, 7 Nov 2002 04:22:27 -0800 Received: from 211.28.96.8 by sea1fd.sea1.hotmail.msn.com with HTTP; Thu, 07 Nov 2002 12:22:26 GMT X-Originating-IP: [211.28.96.8] From: "Nekta Katz" To: pgsql-sql@postgresql.org Subject: cast lo to oid Date: Thu, 07 Nov 2002 23:22:26 +1100 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 07 Nov 2002 12:22:27.0147 (UTC) FILETIME=[559E31B0:01C28658] X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/91 X-Sequence-Number: 10233 Hi, I have the following table create table scan_docs ( docid serial, shipno numeric(10), scan lo, type text ); when I try to create the following rule create rule "delete_scan_docs_lo" as on delete to "scan_docs" do select lo_unlink (old.scan); I get the error message "psql:scan_docs_rule.sql:3: ERROR: Function 'lo_unlink(lo)' does not exist Unable to identify a function that satisfies the given argument types You may need to add explicit typecasts" So I add a type cast create rule "delete_scan_docs_lo" as on delete to "scan_docs" do select lo_unlink (old.scan::oid); but I get the following error message "psql:scan_docs_rule.sql:3: ERROR: Cannot cast type 'lo' to 'oid' " Is there away around this? _________________________________________________________________ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail