can't create type lo (BLOB)

Started by Daniel Schuchardtover 23 years ago2 messagesgeneral
Jump to latest
#1Daniel Schuchardt
daniel_schuchardt@web.de

Hi @ all, thats my problem :

CIMSOFT=# CREATE TYPE lo (internallength=4, externallength=10, input=int4in,
output=int4out, default='', passedbyvalue);

ERROR: TypeCreate: function int4out(lo) does not exist
ERROR: TypeCreate: function int4out(lo) does not exist

CIMSOFT=# SELECT version();
version

----------------------------------------------------------------------------
-----------
PostgreSQL 7.3 on i686-pc-cygwin, compiled by GCC gcc (GCC) 3.2 20020927
(prerelease)
(1 row)

Why this? With PostrgreSql 7.2 this works well.

Thanks for help

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Daniel Schuchardt (#1)
Re: can't create type lo (BLOB)

"Daniel Schuchardt" <daniel_schuchardt@web.de> writes:

Why this? With PostrgreSql 7.2 this works well.

7.3 tries to enforce type safety (with 7.2 it's trivial to create type
definitions that crash the server when used). Your type declaration
doesn't pass because the I/O functions are declared to be for int4,
not lo.

My advice as of 7.3 would be to create type lo as a domain alias for
type OID:

regression=# create domain lo as oid;
CREATE DOMAIN

regards, tom lane