Create Type Problem

From: vinayj(at)ncst(dot)ernet(dot)in
To: pgsql-hackers(at)postgresql(dot)org
Subject: Create Type Problem
Date: 2004-03-31 08:06:32
Message-ID: 1080720392.406a7c083d23e@www.ncst.ernet.in
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi
I am newbe so this problem may be too simple to be asked.please help me if
any new thing to be added in following:
I created data type IndChar The c functions are:
typedef struct IndChar
{
int32 len;
char c_in_str[1];
}IndChar;
then i defined input & output functions.
Input: Datum indcharin(PG_FUNCTION_ARGS);
Output: Datum indcharout(PG_FUNCTION_ARGS);
then i created a function of the same name(i.e. IndChar) as
Datum indchar(PG_FUNCTION_ARGS);//for applying indchar(n) form i.e.fixed length
and i created it using:
create function indchar(IndChar, integer) returns IndChar
language C as 'Path for indchar.so file'
immutable strict;
after these i created data type using:
create type indchar
(input = indcharin,
output = indcharout,
internallength = variable,
storage = extended);
the type is created...
when i use it in create table temp
(name IndChar(20));
it gives error at character '( '.....
please tell me why it is giving such error...
if some steps needed to alter or add tell me...
thanx in advance
Vinay jain

---------------------------------------------------------------
This mail is sent through IMP: http://horde.org/imp/
Used as the Webmail Interface at C-DAC, Mumbai: http://www.ncst.ernet.in

Browse pgsql-hackers by date

  From Date Subject
Next Message Tony Reina 2004-03-31 11:14:08 Why is pg_dump using INSERTs instead of COPYs?
Previous Message Simon Riggs 2004-03-31 07:58:30 FW: Increasing security in a shared environment ...