Re: troubles with postgresql - Mailing list pgsql-general

From erwan ancel
Subject Re: troubles with postgresql
Date
Msg-id 004d01c2db49$3c14b200$0100a8c0@brisedorient
Whole thread Raw
In response to troubles with postgresql  ("erwan ancel" <erwan.ancel@free.fr>)
Responses Re: troubles with postgresql
List pgsql-general
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 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 ?

            Erwan



----- Original Message -----
From: "Oliver Elphick" <olly@lfix.co.uk>
To: "erwan ancel" <erwan.ancel@free.fr>
Cc: <pgsql-general@postgresql.org>; "Thomas Beutin"
<tyrone@laokoon.IN-Berlin.DE>
Sent: Sunday, February 23, 2003 2:26 PM
Subject: Re: [GENERAL] troubles with postgresql


> 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 by date:

Previous
From: Oliver Elphick
Date:
Subject: Re: troubles with postgresql
Next
From: Dennis Gearon
Date:
Subject: Re: troubles with postgresql