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
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])
- Re: [SQL] cast lo to oid Nekta Katz
- Re: [SQL] cast lo to oid Tom Lane
- Re: [SQL] cast lo to oid Nekta Katz
- [SQL] Alter table Rachel.Vaudron
- Re: [SQL] Alter table Tomasz Myrta
- Re: [SQL] Alter table Rachel.Vaudron
- Re: [SQL] Alter table Daniel Schuchardt
- Re: [SQL] cast lo to oid Nekta Katz