From: Nekta Katz <nekta_k@hotmail.com>
To: pgsql-sql@postgresql.org
Subject: cast lo to oid
Date: Thu, 07 Nov 2002 23:22:26 +1100
Message-ID: <F21wAeRaNgEpTX5V3Gy00000652@hotmail.com> (raw)
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: nekta_k@hotmail.com
Subject: Re: cast lo to oid
In-Reply-To: <F21wAeRaNgEpTX5V3Gy00000652@hotmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox