From: | Keith Parks <emkxp01(at)mtcc(dot)demon(dot)co(dot)uk> |
---|---|
To: | hackers(at)postgresql(dot)org |
Subject: | pg_dump, problem with user defined types? |
Date: | 1998-09-23 10:01:47 |
Message-ID: | 199809231001.LAA03231@mtcc.demon.co.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi All,
I can't confirm this against the current latest CVS as my
local tree has undergone some changes, but we seem to have
a problem with "pg_dump" and user defined types.
If I create a type like so:-
CREATE FUNCTION sotime_in (opaque ) RETURNS opaque AS
'/usr/local/pgsql/shlibs/obj/sotimes.so' LANGUAGE 'C';
CREATE FUNCTION sotime_out (opaque ) RETURNS opaque AS
'/usr/local/pgsql/shlibs/obj/sotimes.so' LANGUAGE 'C';
CREATE TYPE sotime ( internallength = 2, externallength = 5,
input = sotime_in, output = sotime_out, send = sotime_out,
receive = sotime_in, default = '-',passedbyvalue);
pg_dump gives me back :-
CREATE TYPE sotime ( internallength = 2, externallength = 5,
input = sotime_in_18272, output = sotime_out_18304, send = sotime_out_18304,
receive = sotime_in_18272, default = '-',passedbyvalue);
CREATE TYPE _sotime ( internallength = -1, externallength = -1,
input = array_in_750, output = array_out_751, send = array_out_751,
receive = array_in_750, default = '-');
.
<table creates>
.
CREATE FUNCTION sotime_in (opaque ) RETURNS opaque AS
'/usr/local/pgsql/shlibs/obj/sotimes.so' LANGUAGE 'C';
CREATE FUNCTION sotime_out (opaque ) RETURNS opaque AS
'/usr/local/pgsql/shlibs/obj/sotimes.so' LANGUAGE 'C';
Looks like the FUNCTION creates are OK but the TYPE creation
is a little confused.
I remember some discussion about name mangling for the functions
but it looks like pg_dump can't cope with this.
Another thing I can't understand is pg_dump dumping the _sotime
type, which seems to be created automatically when I create
the sotime type.
Needless to say, I can't dump/restore a database with user defined
types at all.
Keith.
BTW: I was looking as pg_dump'ing VIEWS.
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Meskes | 1998-09-23 11:57:36 | Recursive Unions |
Previous Message | Tatsuo Ishii | 1998-09-23 07:54:38 | datetime questions and fix to dt.c |