Skip site navigation (1) Skip section navigation (2)

Custom type with width specifier

From: Shachar Shemesh <psql(at)shemesh(dot)biz>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Custom type with width specifier
Date: 2004-06-27 14:25:43
Message-ID: 40DED8E7.3090809@shemesh.biz (view raw or flat)
Thread:
Lists: 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/


Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2004-06-27 14:42:46
Subject: Re: Fixing pg_dump
Previous:From: Christopher Kings-LynneDate: 2004-06-27 08:22:05
Subject: Re: Fixing pg_dump

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group