1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-24 09:27:52 +03:00

Rename lo_create(oid, bytea) to lo_from_bytea().

The previous naming broke the query that libpq's lo_initialize() uses
to collect the OIDs of the server-side functions it requires, because
that query effectively assumes that there is only one function named
lo_create in the pg_catalog schema (and likewise only one lo_open, etc).

While we should certainly make libpq more robust about this, the naive
query will remain in use in the field for the foreseeable future, so it
seems the only workable choice is to use a different name for the new
function.  lo_from_bytea() won a small straw poll.

Back-patch into 9.4 where the new function was introduced.
This commit is contained in:
Tom Lane
2014-06-12 15:39:09 -04:00
parent 7937910781
commit 154146d208
8 changed files with 12 additions and 12 deletions

View File

@@ -207,7 +207,7 @@ SELECT lo_unlink(loid) FROM lotest_stash_values;
\set newloid_1 :LASTOID
SELECT lo_create(0, lo_get(:newloid_1)) AS newloid_2
SELECT lo_from_bytea(0, lo_get(:newloid_1)) AS newloid_2
\gset
SELECT md5(lo_get(:newloid_1)) = md5(lo_get(:newloid_2));