Data Type for "flags"

Data Type for "flags"

am 16.05.2007 11:10:48 von liyan82

Hello all:
I am new to PHP and PostgereSQL with some former experiences of ASP
and MSSQL. My question is when I want to represent different types
of object, or different status of object in my application, e.g.
class of users, I used to use tinyint in MSSQL. But I found there is
no such thing in PGSQL, so what should I use instead? integer, bytea
,or bit(n)? I think integer will be the most convenient to use,
isn't it?

Regards,
Ian

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

Re: Data Type for "flags"

am 16.05.2007 11:29:22 von liyan82

Oops... I've just omitted the smallint type at the beginning of the=20
document. Thanks anyway!

ÀîÑå Ian Li wrote:
> Hello all:
> I am new to PHP and PostgereSQL with some former experiences of ASP=
=20
> and MSSQL. My question is when I want to represent different types of=20
> object, or different status of object in my application, e.g. class of=20
> users, I used to use tinyint in MSSQL. But I found there is no such=20
> thing in PGSQL, so what should I use instead? integer, bytea ,or bit(n)=
?=20
> I think integer will be the most convenient to use, isn't it?
>=20
> Regards,
> Ian
>=20


---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings