Re: varchar error

Поиск
Список
Период
Сортировка
От Anthony van den Berg
Тема Re: varchar error
Дата
Msg-id 42BA7593.2030803@kaartjeposten.nl
обсуждение исходный текст
Ответ на varchar error  ("Raul Secan" <raul@zerosoft.ro>)
Список pgsql-php
you might try a trigger!


Raul Secan wrote:
Hello, I just have this:
 
CREATE TABLE test (
    mytext varchar(5)
) WITHOUT OIDS;
 
If I put a string with more than 5 chars in mytext, I receive an error, regarding the wrong lenght of the string.
 
In MySQL I know that the string is automatically reduced to the number of char allowed by the column, even if I insert a longer string.
 
I don't want to do this from PHP, and I was wandering how this can be done in PostreSQL? Maybe in CREATE TABLE definition?
 
Cheers, Raul.

--

Kaartjeposten.nl
Molukkenstraat 80 / 7512 XT  Enschede
* info@kaartjeposten.nl / msn. kaartjeposten@hotmail.com
i. www.kaartjeposten.nl / t. 06 - 28 13 88 57
Nu ook voor uw verjaardagkalenders

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

Предыдущее
От: Volkan YAZICI
Дата:
Сообщение: Re: varchar error
Следующее
От: Gnanavel Shanmugam
Дата:
Сообщение: Re: varchar error