Re: [HACKERS] [QUESTIONS] builtin lo_unlink(int4)? why int4 not oid? - Mailing list pgsql-hackers

From Peter T Mount
Subject Re: [HACKERS] [QUESTIONS] builtin lo_unlink(int4)? why int4 not oid?
Date
Msg-id Pine.LNX.3.95.980613104415.16365A-100000@retep.org.uk
Whole thread Raw
In response to [QUESTIONS] builtin lo_unlink(int4)? why int4 not oid?  ("Park, Chul-Su" <pcs@mhlx01.kek.jp>)
Responses Re: [HACKERS] [QUESTIONS] builtin lo_unlink(int4)? why int4 not oid?  (Chul Su Park <pcs@bmail.kek.jp>)
Re: [HACKERS] [QUESTIONS] builtin lo_unlink(int4)? why int4 not oid?  (Bruce Momjian <maillist@candle.pha.pa.us>)
List pgsql-hackers
On Sat, 13 Jun 1998, Park, Chul-Su wrote:

> Hello all,
>
> e.g.
>
>     I want to delete a large object with this table
>
> CREATE TABLE image (
>     name            text,
>     raster          oid
> );
>
> -- from programmer's guide
>
> in the psql
>
> foo=> select lo_unlink(raster) from image;
> ERROR:  function int4(oid) does not exist
>
> Why builtin "lo_unlink" is defined as accepting int4 not oid?  Then do I
> have to do
> foo=> select lo_unlink(int4(oid_text(raster))) from image;
> OR
> define "raster" as int4?  I don't think all these are good idea...  Then
> how to delete "lo" in the "psql"?

I've just tested this, and I get the same thing (on 6.3.2, and yesterdays
CVS versions).

lo_unlink should be defined with oid (which I thought was the case).

A temporary way round is:

    select lo_unlink(raster::int4) from image;

Hackers: Is there any reason why it's defined as an int4?

--
Peter T Mount peter@retep.org.uk or petermount@earthling.net
Main Homepage: http://www.retep.org.uk
************ Someday I may rebuild this signature completely ;-) ************
Work Homepage: http://www.maidstone.gov.uk Work EMail: peter@maidstone.gov.uk


pgsql-hackers by date:

Previous
From: dg@illustra.com (David Gould)
Date:
Subject: Re: [HACKERS] update by one transaction
Next
From: Peter T Mount
Date:
Subject: Re: [HACKERS] Re: Odd behavior in regression test?