Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 08B5E9FB737 for ; Wed, 16 May 2007 06:30:16 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 34975-04 for ; Wed, 16 May 2007 06:29:57 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.177]) by postgresql.org (Postfix) with ESMTP id 725239FB5FF for ; Wed, 16 May 2007 06:30:00 -0300 (ADT) Received: by py-out-1112.google.com with SMTP id a73so426091pye for ; Wed, 16 May 2007 02:29:58 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:disposition-notification-to:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; b=e3k3Nc3nWlsC36bkpSXpabN6dZ+cQy+NJhA5nq+mZcRQ1C/2BGCcEt1/xoGc4zDrA/KU/lQ1UJ+oEg3LHw2TFahN+kINSyXu75oJk+b3XQtRBIbHOfBwwPJWNIReLYprmPdX3whT6EpNarYLB+9p7A3nZLIEXOylJlEkCcK1XV0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:disposition-notification-to:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; b=t5fTWNYfFxDt/1ESmCC/Vghl35nLwoAa42OJF9rVnPqphX74BhGCqxzHN77kmrdqo2cS9IBuFsGkvb0KtaoRxz2TT4eUnFQJ2rWT2qsp9NE85xzTNpbhtZGVuHfet+pvvGZ87GOQH3V6e6NYfXy4T7olq9xlx4LdiEFJLOlrId0= Received: by 10.35.49.4 with SMTP id b4mr10547997pyk.1179307798518; Wed, 16 May 2007 02:29:58 -0700 (PDT) Received: from ?222.71.189.94? ( [222.71.189.94]) by mx.google.com with ESMTP id v55sm2125488pyh.2007.05.16.02.29.54; Wed, 16 May 2007 02:29:56 -0700 (PDT) Message-ID: <464ACEF2.2000203@gmail.com> Date: Wed, 16 May 2007 17:29:22 +0800 From: =?gb18030?Q?=C0=EE=D1=E5_Ian_Li?= User-Agent: Icedove 1.5.0.10 (X11/20070329) MIME-Version: 1.0 To: pgsql-php@postgresql.org CC: becker@adocom.de Subject: Re: Data Type for "flags" References: <464ACA98.40000@gmail.com> In-Reply-To: <464ACA98.40000@gmail.com> Content-Type: text/plain; charset=gb18030; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/6 X-Sequence-Number: 3795 Oops... I've just omitted the smallint type at the beginning of the document. Thanks anyway! ÀîÑå Ian Li wrote: > 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 >