1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

Add a bunch of pseudo-types to replace the behavior formerly associated

with OPAQUE, as per recent pghackers discussion.  I still want to do some
more work on the 'cstring' pseudo-type, but I'm going to commit the bulk
of the changes now before the tree starts shifting under me ...
This commit is contained in:
Tom Lane
2002-08-22 00:01:51 +00:00
parent 606c9b9d4f
commit b663f3443b
126 changed files with 2005 additions and 1205 deletions

View File

@ -1,21 +1,21 @@
--
-- PostgreSQL code for LargeObjects
--
-- $Id: lo.sql.in,v 1.6 2000/11/21 21:51:58 tgl Exp $
-- $Id: lo.sql.in,v 1.7 2002/08/22 00:01:39 tgl Exp $
--
--
-- Create the data type
--
-- used by the lo type, it takes an oid and returns an lo object
create function lo_in(opaque)
returns opaque
create function lo_in(cstring)
returns lo
as 'MODULE_PATHNAME'
language 'c';
-- used by the lo type, it returns the oid of the object
create function lo_out(opaque)
returns opaque
create function lo_out(lo)
returns cstring
as 'MODULE_PATHNAME'
language 'c';
@ -51,6 +51,6 @@ create function lo(oid)
-- This is used in triggers
create function lo_manage()
returns opaque
returns trigger
as 'MODULE_PATHNAME'
language 'c';

View File

@ -6,16 +6,10 @@
-- remove our test table
drop table a;
-- now drop any sql based functions associated with the lo type
drop function oid(lo);
-- now drop the type and associated C functions
drop type lo CASCADE;
-- now drop the type
drop type lo;
-- as the type is gone, remove the C based functions
drop function lo_in(opaque);
drop function lo_out(opaque);
drop function lo(oid);
-- the trigger function has no dependency on the type, so drop separately
drop function lo_manage();
-- the lo stuff is now removed from the system