Re: type aliases

Поиск
Список
Период
Сортировка
От James Harper
Тема Re: type aliases
Дата
Msg-id 6035A0D088A63A46850C3988ED045A4B6F3A5552@BITCOM1.int.sbss.com.au
обсуждение исходный текст
Ответ на Re: type aliases  (Behrang Saeedzadeh <behrangsa@gmail.com>)
Ответы Re: type aliases  (David Johnston <polobo@yahoo.com>)
Список pgsql-general
>
> You probably should define your domain like this:
>
>    CREATE DOMAIN myvarchar varchar(42);
>

That's what I thought, so it won't do what I want. I need to be able to set the length at the time of declaration.

So suppose I wanted to implement myvarchar in C. In my _in function, how do I know how big my column declaration is? Eg
ifsomeone tries to insert 50 characters into my 42 character field, how do I get the declared length and then tell
postgresthat the data to be inserted is too big? 

Thanks

James



В списке pgsql-general по дате отправления:

Предыдущее
От: Behrang Saeedzadeh
Дата:
Сообщение: Re: type aliases
Следующее
От: Clemens Eisserer
Дата:
Сообщение: Will modifications to unlogged tables also be flused to disk?