Re: troubles with postgresql
От | Bruno Wolff III |
---|---|
Тема | Re: troubles with postgresql |
Дата | |
Msg-id | 20030223151657.GA4937@wolff.to обсуждение исходный текст |
Ответ на | Re: troubles with postgresql ("erwan ancel" <erwan.ancel@free.fr>) |
Список | pgsql-general |
On Sun, Feb 23, 2003 at 15:38:30 +0100, erwan ancel <erwan.ancel@free.fr> wrote: > Thanks everyone. > For the char(n): I did not know this was defined by the SQL standard. So ok, > and I will use the varchar type. For Postgres you are probably better off using text instead of varchar(n) unless there is something in your model that limits the length of the string. If mysql doesn't have text, then you may still want to use varchar anyway for portability. > For the unsigned values. Well, I would like to make portable applications > between PostgreSQL and MySQL. This means that if unsigned values do not have > the same range for the 2 versions, this can be a problem. And again, I do > not understand why PostgreSQL doesn't deal with unsigned. It should be so > simple... Is it planned for one of the next releases ? The simplest option is probably to use a large enough integer type that you can hold the biggest integer you need in either database. In 7.4 check constraints will work with domains. Then you will be able to define something that looks like an unsigned integer type and the postgres specific stuff will be in just one place. However the maximum value probably still won't match mysql because the underlying type will still be signed and you will lose one bit for the sign.
В списке pgsql-general по дате отправления: