X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 72B77329F09 for ; Sun, 3 Oct 2004 22:49:42 +0100 (BST) 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 67867-07 for ; Sun, 3 Oct 2004 21:49:38 +0000 (GMT) Received: from stark.xeocode.com (gsstark.mtl.istop.com [66.11.160.162]) by svr1.postgresql.org (Postfix) with ESMTP id C3B18329EC4 for ; Sun, 3 Oct 2004 22:49:40 +0100 (BST) Received: from localhost ([127.0.0.1] helo=stark.xeocode.com) by stark.xeocode.com with smtp (Exim 3.36 #1 (Debian)) id 1CEEEX-0002vl-00; Sun, 03 Oct 2004 17:49:33 -0400 To: pgsql-hackers@postgresql.org Subject: Re: Mislabeled timestamp functions (was Re: [SQL] [NOVICE] date_trunc'd timestamp index possible?) References: <13492.1096656574@sss.pgh.pa.us> <15677.1096671183@sss.pgh.pa.us> <200410021941.30084.peter_e@gmx.net> <22070.1096741370@sss.pgh.pa.us> In-Reply-To: <22070.1096741370@sss.pgh.pa.us> From: Greg Stark Organization: The Emacs Conspiracy; member since 1992 Date: 03 Oct 2004 17:49:32 -0400 Message-ID: <87ekkf1ngz.fsf@stark.xeocode.com> Lines: 46 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200410/64 X-Sequence-Number: 59567 Tom Lane writes: > Peter Eisentraut writes: > > Tom Lane wrote: > >> What I'm inclined to do with these is change pg_proc.h but not force > >> an initdb. Does anyone want to argue for an initdb to force it to be > >> fixed in 8.0? We've lived with the wrong labelings for some time now > >> without noticing, so it doesn't seem like a serious enough bug to > >> force a post-beta initdb ... to me anyway. > > > I'd prefer if all users of 8.0 were guaranteed to have the same catalog. > > Well, there's something to be said for that viewpoint too. Anyone else > feel the same? I would wonder about any users that are happily using beta3 with test data and upgrade to 8.0 without any problems but at some point later have trouble restoring from a pg_dump. > Specifically I want to remove these operators: > > oid | oid | oprresult > -----+-------------------+----------- > 635 | +("char","char") | "char" > 636 | -("char","char") | "char" > 637 | *("char","char") | "char" > 638 | /("char","char") | "char" > ... > The reason the "char" arithmetic operators are dangerous is that they are > the only ones of those names in the STRING type category. What would happen if "char" were just removed from the STRING type category? Or alternatively if it were broken out into two data types, "char" which didn't have these operators, and int1 which only had these operators and not all the string operators? It does seem like having a fixed size 1 byte integer data type would be something appealing. Personally I find a lot of demand in my database models for status flags that have very few possible states (often only two but I don't want to limit myself with a boolean and booleans don't behave nicely with any other application language since they return 't' and 'f'). I could easily see some very large table where someone wants to store lots of small integers that need some arithmetic capabilities. -- greg