X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 9F857D1BA9D; Fri, 5 Sep 2003 20:10:24 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 18972-05; Fri, 5 Sep 2003 17:09:51 -0300 (ADT) Received: from bob.samurai.com (bob.samurai.com [205.207.28.75]) by svr1.postgresql.org (Postfix) with ESMTP id 693FDD1E4BE; Fri, 5 Sep 2003 15:20:22 -0300 (ADT) Received: from 6-allhosts (d226-85-166.home.cgocable.net [24.226.85.166]) by bob.samurai.com (Postfix) with ESMTP id 76A9A1E00; Fri, 5 Sep 2003 14:20:18 -0400 (EDT) Subject: Re: [PERFORM] Seq scan of table? From: Neil Conway To: Richard Huxton Cc: Bjorn T Johansen , PostgreSQL General , PostgreSQL Performance In-Reply-To: <200309051107.12756.dev@archonet.com> References: <58940.193.212.14.12.1062742087.squirrel@www.havleik.no> <31414.193.212.14.12.1062751674.squirrel@www.havleik.no> <200309051107.12756.dev@archonet.com> Content-Type: text/plain Message-Id: <1062786017.447.1.camel@tokyo> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.4 Date: Fri, 05 Sep 2003 14:20:18 -0400 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/503 X-Sequence-Number: 48725 On Fri, 2003-09-05 at 06:07, Richard Huxton wrote: > PG's parser will assume an explicit number is an int4 - if you need an int8 > etc you'll need to cast it, yes. Or enclose the integer literal in single quotes. > You should find plenty of discussion of why in the archives, but the short > reason is that PG's type structure is quite flexible which means it can't > afford to make too many assumptions. Well, it's definitely a bug in PG, it's "quite flexible" type structure notwithstanding. -Neil