about create type

Started by zhuangjifengover 22 years ago2 messagesbugs
Jump to latest
#1zhuangjifeng
zhuangjifeng@263.net

Dear Sir:
I have tried to create a new Type in postgreSQL-7.2. The
example is defined in Chapter 39 of extended type. We do follow your
defination of "Complex" completely.But there is always an error:

I entered :
CREATE TYPE
complex(INPUT=complex_in,OUTPUT=complex_out(Complex),INTERNALLENGTH=16);

but it shows
ERROR: parser:parse error at or near '(' ".

Could you please give me a comprehensible explanation. I
expect to hear from you!
Thank you very much!

PS: our source code is in attachment

Attachments:

complex.c~text/plain; name=complex.c~Download
#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: zhuangjifeng (#1)
Re: about create type

zhuangjifeng <zhuangjifeng@263.net> writes:

I have tried to create a new Type in postgreSQL-7.2. The
example is defined in Chapter 39 of extended type. We do follow your
defination of "Complex" completely.But there is always an error:

CREATE TYPE
complex(INPUT=complex_in,OUTPUT=complex_out(Complex),INTERNALLENGTH=16);
ERROR: parser:parse error at or near '(' ".

You should not put parameters with the input/output function names.
(I'm pretty sure that none of our documentation suggests you should.)

regards, tom lane