Re: What is lo_insert? - Mailing list pgsql-hackers

From Robert Haas
Subject Re: What is lo_insert?
Date
Msg-id AANLkTik0YcgjvHPm3eoi7Uax3CoO9h3t4uEOc+5yskaY@mail.gmail.com
Whole thread Raw
In response to What is lo_insert?  (Bruce Momjian <bruce@momjian.us>)
Responses Re: What is lo_insert?  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
On Wed, Jan 5, 2011 at 12:21 PM, Bruce Momjian <bruce@momjian.us> wrote:
> The psql manual page mentions lo_insert:
>
>           LASTOID
>               The value of the last affected OID, as returned
> -->            from an INSERT or lo_insert command. This variable
>               is only guaranteed to be valid until after the
>               result of the next SQL command has been displayed.
>
> Should that be lo_import?  I don't see lo_insert used anywhere.  And it
> doesn't seem lo_import sets LASTOID.

I think it's supposed to be lo_import.  It sets LASTOID if you do this:

rhaas=# \lo_import '/etc/passwd'
lo_import 16414
rhaas=# select :LASTOID;?column?
----------   16414
(1 row)

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: crash-safe visibility map, take three
Next
From: Bruce Momjian
Date:
Subject: Fix for pg_upgrade migrating pg_largeobject_metadata