X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id F2193564A3 for ; Thu, 17 Mar 2005 12:30:10 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 11367-10 for ; Thu, 17 Mar 2005 12:30:00 +0000 (GMT) Received: from sharp.noc24x7.com (unknown [69.56.128.138]) by svr1.postgresql.org (Postfix) with ESMTP id DA84D56530 for ; Thu, 17 Mar 2005 12:29:58 +0000 (GMT) Received: from [61.3.110.155] (helo=thenilgiris.web) by sharp.noc24x7.com with esmtp (Exim 4.44) id 1DBu8X-00017J-LS; Thu, 17 Mar 2005 18:00:02 +0530 Received: by thenilgiris.web (Postfix, from userid 500) id 353D15BF15; Thu, 17 Mar 2005 18:01:20 +0530 (IST) From: Kenneth Gonsalves To: weberp@paradise.net.nz Subject: Re: Query performance problem Date: Thu, 17 Mar 2005 18:01:19 +0530 User-Agent: KMail/1.6.1 Cc: pgsql-sql@postgresql.org References: <200503172120.20676.weberp@paradise.net.nz> In-Reply-To: <200503172120.20676.weberp@paradise.net.nz> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <200503171801.19412.lawgon@thenilgiris.com> X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - sharp.noc24x7.com X-AntiAbuse: Original Domain - postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [47 12] X-AntiAbuse: Sender Address Domain - thenilgiris.com X-Source: X-Source-Args: X-Source-Dir: X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.108 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200503/239 X-Sequence-Number: 20718 On Thursday 17 Mar 2005 1:50 pm, Phil Daintree wrote: > CREATE TABLE chartdetails ( > accountcode integer DEFAULT 0 NOT NULL, > period integer DEFAULT 0 NOT NULL, > budget double precision DEFAULT (0)::double precision NOT NULL, > actual double precision DEFAULT (0)::double precision NOT NULL, > bfwd double precision DEFAULT (0)::double precision NOT NULL, > bfwdbudget double precision DEFAULT (0)::double precision NOT > NULL ); although may be not relevant to your question, as i have noticed this=20 before with mysql 'sql', what is the point of having a NOT NULL field=20 that defaults to 0? the whole idea of a NOT NULL field is to have the=20 value filled in compulsorily and having a default of 0 or '' defeats=20 the purpose =2D-=20 =2D-=20 regards kg http://www.livejournal.com/users/lawgon tally ho! http://avsap.sourceforge.net =E0=B2=87=E0=B2=82=E0=B2=A1=E0=B3=8D=E0=B2=B2=E0=B2=BF=E0=B2=A8=E0=B2=95=E0= =B3=8D=E0=B2=B8 =E0=AE=B5=E0=AE=BE=E0=AE=B4=E0=AF=8D=E0=AE=95!