2011-02-14 02:06:41 +01:00
|
|
|
/* contrib/lo/lo--1.0.sql */
|
2002-10-18 20:41:22 +02:00
|
|
|
|
2011-10-12 21:45:03 +02:00
|
|
|
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
|
|
|
|
\echo Use "CREATE EXTENSION lo" to load this file. \quit
|
|
|
|
|
2005-06-23 02:06:37 +02:00
|
|
|
--
|
|
|
|
-- Create the data type ... now just a domain over OID
|
|
|
|
--
|
1998-06-16 09:07:11 +02:00
|
|
|
|
2005-06-23 02:06:37 +02:00
|
|
|
CREATE DOMAIN lo AS pg_catalog.oid;
|
2000-11-21 22:51:58 +01:00
|
|
|
|
2005-06-23 02:06:37 +02:00
|
|
|
--
|
|
|
|
-- For backwards compatibility, define a function named lo_oid.
|
|
|
|
--
|
|
|
|
-- The other functions that formerly existed are not needed because
|
|
|
|
-- the implicit casts between a domain and its underlying type handle them.
|
|
|
|
--
|
2011-02-14 03:24:14 +01:00
|
|
|
CREATE FUNCTION lo_oid(lo) RETURNS pg_catalog.oid AS
|
2005-06-23 02:06:37 +02:00
|
|
|
'SELECT $1::pg_catalog.oid' LANGUAGE SQL STRICT IMMUTABLE;
|
1998-06-16 09:07:11 +02:00
|
|
|
|
|
|
|
-- This is used in triggers
|
2011-02-14 03:24:14 +01:00
|
|
|
CREATE FUNCTION lo_manage()
|
2005-06-23 02:06:37 +02:00
|
|
|
RETURNS pg_catalog.trigger
|
2002-10-18 20:41:22 +02:00
|
|
|
AS 'MODULE_PATHNAME'
|
2005-01-29 23:35:02 +01:00
|
|
|
LANGUAGE C;
|