Custom type with width specifier

Поиск
Список
Период
Сортировка
От Shachar Shemesh
Тема Custom type with width specifier
Дата
Msg-id 40DED8E7.3090809@shemesh.biz
обсуждение исходный текст
Ответы Re: Custom type with width specifier  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Custom type with width specifier  (Peter Eisentraut <peter_e@gmx.net>)
Список 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 по дате отправления:

Предыдущее
От: Christopher Kings-Lynne
Дата:
Сообщение: Re: Fixing pg_dump
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Fixing pg_dump