Custom type with width specifier - Mailing list pgsql-hackers

From Shachar Shemesh
Subject Custom type with width specifier
Date
Msg-id 40DED8E7.3090809@shemesh.biz
Whole thread Raw
Responses Re: Custom type with width specifier
Re: Custom type with width specifier
List pgsql-hackers
Hi list,

I'm trying to create a varchar clone (called varcharci). I have defined 
new functions called "varcharciin", "varcharciout", "varcharcisend" and 
"recv", using the "varcharin" etc. definitions (i.e. - builtin 
functions). I defined the type. Everything works, except that when I try 
to create a table it fails. This only happens when I try to give maximum 
length to the type. So the command:
create table foo ( bar varcharci );
succeeds, but
create table foo (bar varcharci(12) );
fails.

What do I need to do in order to get the width specifier into my type? 
I'm not even sure what function is called in order to say that the type 
needs a width specifier.

Many thanks            Shachar

-- 
Shachar Shemesh
Lingnu Open Source Consulting ltd.
http://www.lingnu.com/



pgsql-hackers by date:

Previous
From: Christopher Kings-Lynne
Date:
Subject: Re: Fixing pg_dump
Next
From: Tom Lane
Date:
Subject: Re: Fixing pg_dump