Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2]) by hub.org (8.9.3/8.9.3) with ESMTP id LAA26969 for ; Fri, 25 Feb 2000 11:29:37 -0500 (EST) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id LAA07604; Fri, 25 Feb 2000 11:29:17 -0500 (EST) To: "Moray McConnachie" cc: pgsql-sql@postgreSQL.org Subject: Re: [SQL] how to create index on timestamp field in pre v7 database In-reply-to: <006e01bf7f81$b9a91d40$760e01a3@oucs.ox.ac.uk> References: <23337.951436670@sss.pgh.pa.us> <006e01bf7f81$b9a91d40$760e01a3@oucs.ox.ac.uk> Comments: In-reply-to "Moray McConnachie" message dated "Fri, 25 Feb 2000 11:16:10 +0000" Date: Fri, 25 Feb 2000 11:29:16 -0500 Message-ID: <7601.951496156@sss.pgh.pa.us> From: Tom Lane "Moray McConnachie" writes: > Agreed - but note that pg_dump currently produces CREATE INDEX > statements with opclasses included. Right, as it should since its purpose is to ensure you rebuild exactly the same database. I was just opining that handwritten CREATE INDEXes usually can omit the opclass. (BTW, I fixed the problem with functional indexes needing an explicit opclass spec last night.) > That means running a script created by pg_dump v.6.5.x will fail under > 7.0 because there is no index opclass of the type datetime? An embarrassing problem. We are going to work around this by having the 7.0 parser discard the word "datetime" if it sees it in the opclass position. There are a couple of other now-dead opclass names that will be discarded in the same way. Klugy, but it will get the job done for reading old dump files. (This hack is not in 7.0beta1, but will be in beta2.) regards, tom lane