Обсуждение: next question, signed/unsigned

Поиск
Список
Период
Сортировка

next question, signed/unsigned

От
Andy Harrison
Дата:
-----BEGIN PGP SIGNED MESSAGE-----

I'm trying to do what I can to help the phpwebsite guys get their app working
with postgres.  They're quite willing so I'm trying to do what legwork I can
for them.

Their script runs this during install:

CREATE TABLE cache ( mod_title varchar(30) NOT NULL default '', id varchar(32)
NOT NULL default '', data text NOT NULL, ttl int unsigned NOT NULL default
'0');

postgres doesn't like unsigned at all.  I can't really find a reference to
unsigned integers related to creating columns in the docs, so does this even
apply?  Should I just tell them to ignore it in postgres?



~~
Andy Harrison
ah##@httpsite.com
ICQ: 123472  AIM/Y!: AHinMaine
[full headers for details]

-----BEGIN PGP SIGNATURE-----
Version: PGP 6.5.8

iQCVAwUBPpRp7VPEkLgodAWVAQFnGAP+MkIXQGzJxEAkXeEncBSHXG0r65jhiruM
nj+z0L+fQUEcPPZV4UfUsZUMnGpqZRYnl+DdqHI85g2+BBrydQZFA83AxXRNDhvi
mZoVTR8ha/yPnvRsA5Jz86HlbhJbj6JuQ/lQup67VOmYbSsCrCFBaKA7YafcgoQ+
EvBeDi9chSA=
=MiSW
-----END PGP SIGNATURE-----


Re: next question, signed/unsigned

От
Josh Berkus
Дата:
Andy,

> postgres doesn't like unsigned at all.  I can't really find a reference to
> unsigned integers related to creating columns in the docs, so does this even
> apply?  Should I just tell them to ignore it in postgres?

Postgres does not support the "unsigned" keyword.

Should they need, for some reason, the functionality of an unsigned integer,
you can always create a DOMAIN of int that does not permit values < 0.

But in either case, you'll need to modify the CREATE TABLE statements.

--
-Josh Berkus
 Aglio Database Solutions
 San Francisco