Martijn van Oosterhout wrote:
> On Wed, Jun 27, 2007 at 02:08:43PM +0200, Michael Enke wrote:
>> Hello everyone,
>> I have created a new data type "mychar". How can I specify a limit for it?
>>
>> This (unlimited version) works fine:
>> create table table_a(col_a mychar);
>
> What you want is called "user defined typmod" and I don't beleive any
> released version has it, but it will be in the next release.
I believe he could do it with a domain.
create domain myreal_char as varchar(50);
create table table_a(col_a myreal_char);
Joshua D. Drake
>
> Have a nice day,
--
=== The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
Providing the most comprehensive PostgreSQL solutions since 1997 http://www.commandprompt.com/
Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
PostgreSQL Replication: http://www.commandprompt.com/products/