Re: lo function changed in PostgreSQL 8.1.1

From: "Premsun Choltanwanich" <Premsun(at)nsasia(dot)co(dot)th>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Richard Huxton" <dev(at)archonet(dot)com>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: lo function changed in PostgreSQL 8.1.1
Date: 2005-12-20 04:35:29
Message-ID: 43A7EC77.C5F7.004C.0@nsasia.co.th
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

From contrib/lo I found that it has something difference between old and new version of PostgreSQL. And I'm sure that I already tick on Large Object (lo) option when I install.

How can I manage on difference function?



:::New Version:::

DOMAIN lo AS pg_catalog.oid;

FUNCTION lo_oid(lo) RETURNS pg_catalog.oid AS 'SELECT $1::pg_catalog.oid' LANGUAGE SQL STRICT IMMUTABLE;

FUNCTION lo_manage() RETURNS pg_catalog.trigger AS '$libdir/lo' LANGUAGE C;




:::Old Version:::

FUNCTION lo_in(cstring) RETURNS lo AS '$libdir/lo' LANGUAGE C IMMUTABLE STRICT;

FUNCTION lo_out(lo) RETURNS cstring AS '$libdir/lo' LANGUAGE C IMMUTABLE STRICT;

TYPE lo ( INTERNALLENGTH = 4, EXTERNALLENGTH = variable, INPUT = lo_in, OUTPUT = lo_out);

FUNCTION lo_oid(lo) RETURNS oid AS '$libdir/lo' LANGUAGE C IMMUTABLE STRICT;

FUNCTION oid(lo) RETURNS oid AS '$libdir/lo', 'lo_oid' LANGUAGE C IMMUTABLE STRICT;

CAST (lo as oid) WITH FUNCTION oid(lo) AS IMPLICIT;

FUNCTION lo(oid) RETURNS lo AS '$libdir/lo' LANGUAGE C IMMUTABLE STRICT;

CAST (oid as lo) WITH FUNCTION lo(oid) AS IMPLICIT;

FUNCTION lo_manage() RETURNS trigger AS '$libdir/lo' LANGUAGE C;

>>> Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> 12/14/2005 22:06:33 >>>
"Premsun Choltanwanich" <Premsun(at)nsasia(dot)co(dot)th> writes:
> I think I use contrib/lo type for manage lo. What is wrong?

You need to use the 8.1 version of contrib/lo, not any previous version.

You might find that the easiest way to manage this is to create an empty
database, load the 8.1 contrib/lo definitions by running lo.sql, then
restoring from your pg_dump backup. You'll see some complaints about
duplicate function definitions but these can be ignored.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jess Balint 2005-12-20 05:11:43 Re: Lock issue when trying to vacuum db
Previous Message Tom Lane 2005-12-20 04:32:03 Re: localization problem (and solution)