Re: troubles with postgresql
| От | Oliver Elphick |
|---|---|
| Тема | Re: troubles with postgresql |
| Дата | |
| Msg-id | 1046006785.27000.2.camel@linda.lfix.co.uk обсуждение исходный текст |
| Ответ на | Re: troubles with postgresql (Thomas Beutin <tyrone@laokoon.IN-Berlin.DE>) |
| Список | pgsql-general |
On Sun, 2003-02-23 at 11:03, Thomas Beutin wrote:
> Hi,
>
> On Sun, Feb 23, 2003 at 09:22:44AM +0100, erwan ancel wrote:
> > - apparently, there is no unsigned number type. why ??? This is very useful,
> > especially for serials.
> AFIAK there no unsigned int, but You can define the MINVALUE and START(-value)
> for the sequence, so this is IMHO not a big problem.
Furthermore, you can set a check constraint on the column:
CONSTRAINT "thiscol not negative"
CHECK (thiscol >= 0)
> > - when we get a record containing a fixed sized string rows, we always get a
> > string that is filled with spaces at the end to match max size. Again, why ?
> I bet You're using char(n) instead of varchar(n)?! char(n) is space padded up
> to the length of n chars.
And that behaviour of CHAR() is according to the SQL standard.
--
Oliver Elphick Oliver.Elphick@lfix.co.uk
Isle of Wight, UK http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
========================================
"All scripture is given by inspiration of God, and is
profitable for doctrine, for reproof, for correction,
for instruction in righteousness; That the man of God
may be perfect, thoroughly furnished unto all good
works." II Timothy 3:16,17
В списке pgsql-general по дате отправления: