Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Xm2HJ-0005qf-Dc for pgsql-bugs@arkaria.postgresql.org; Wed, 05 Nov 2014 15:13:45 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Xm2HI-0004Uy-Uf for pgsql-bugs@arkaria.postgresql.org; Wed, 05 Nov 2014 15:13:44 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Xm2HI-0004Ur-9q for pgsql-bugs@postgresql.org; Wed, 05 Nov 2014 15:13:44 +0000 Received: from s3.travelaudience.com ([144.76.44.146]) by magus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1Xm2HA-0002fN-Gy for pgsql-bugs@postgresql.org; Wed, 05 Nov 2014 15:13:43 +0000 Received: from localhost (localhost [127.0.0.1]) by localhost (Postfix) with ESMTP id 054EBD0044C for ; Wed, 5 Nov 2014 16:13:35 +0100 (CET) X-Virus-Scanned: by amavisd-new-2.7.1 (20120429) (Debian) at s3.travelaudience.com Received: from localhost ([127.0.0.1]) by localhost (s3.travelaudience.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id zjPzk_4Kuw-a; Wed, 5 Nov 2014 16:13:30 +0100 (CET) Received: from [192.168.10.85] (pd95c8270.dip0.t-ipconnect.de [217.92.130.112]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) (Authenticated sender: j.pittman@travelaudience.com) by s3.travelaudience.com (Postfix) with ESMTPSA id 7349ED0012C; Wed, 5 Nov 2014 16:13:29 +0100 (CET) Message-ID: <545A3E99.7020800@travelaudience.com> Date: Wed, 05 Nov 2014 16:13:29 +0100 From: James Pittman User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: pgsql-bugs@postgresql.org CC: =?UTF-8?B?Tm9yYmVydCBCdWNobcO8bGxlcg==?= Subject: BUG REPORT: GiST - default operator type for boolean Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ewlPWiWvx3CGedklU8hFaD8PNjDBehtPX" X-Pg-Spam-Score: -2.5 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --ewlPWiWvx3CGedklU8hFaD8PNjDBehtPX Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Apologies if this is more of a 'feature request' than a bug. I thought I'd repeat it as it seems an unusual missing feature. With btree_gist it does not apepar possible to use the equals constraint with a boolean type. Therefore this (slightly contrived) example fails: CREATE TABLE meetings_calendar ( id serial, firstname varchar NOT NULL, meeting_time daterange NOT NULL, is_alternative_schedule boolean NOT NULL, PRIMARY KEY (id), CONSTRAINT no_time_overlap_except_alternative EXCLUDE USING gist (meeting_time WITH &&, is_alternative_schedule WITH =3D) ); ERROR: data type boolean has no default operator class for access method "gist" My workaround is to recast the boolean to an integer in the constraint itself. CONSTRAINT no_time_overlap_except_alternative EXCLUDE USING gist (meeting_time WITH &&, (is_alternative_schedule::int) WITH =3D) This however, only works with btree_gist - unexpended GiST does not have a default operator for integers either. Therefore it might be worth considering this as a feature enhancement. Apologies if this is already on the TODO list. The GiST documentation was quite weighty and it did not seem obvious if this has been discussed.= Eitherway, I hope this request is of assistance Kind regards, James --ewlPWiWvx3CGedklU8hFaD8PNjDBehtPX Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJUWj6ZAAoJEAhp0xcigHkbZ8wP/A9YwwwSxvFHzzI9oI5oxEFv 8gPPs6mCrwqUkoGaLxOJgAtFtHknZhUWuieA+YoVkXc3gT9TAA8AZO8KzkRzKGY+ i+HhbjQd/wCQuVmPSbR70uA10NHFA/ZMg2a3ynziAjMFU7MJMrCiLzyycpT3vo49 UQ2HK8Z/sq6L8CNqbOU1ieagXv3I16v5yCkWKKeHUmMcaPsDLS+YB+BQ27zpD5Yc 2O87yKNTxraeQ68mm1DtBvz2hill8iD5aJcAc0ZkHd6bJZqhI/UKn3CZNQWRWKge 3/agmJr1A1PbO0Uua/QSkbMMn1Lp6qNSfZGB/aqzQpVw2dLby12FxZW8nLYqQ2P7 ud6X5wx7WyoDPiVqz9Jt6tkG8SJCsJ+AsVZT5WcmydzmGtNZfzBqu+L3E0f3X+at 5q8rUwk71Ek2gB/KGYLBDKUyym4zxQSz36SlJU+Tjm0/PAxD0pOKOOAPp5Iwu2fI esy+yXC0RhycA080JNRGG7TDvM2p8XNENjVJPXPmmBXuIP/yezl19Rf9mPRM3rW6 wwfoelekoeJnP9I25V7h9UGMWY5wfa5wevTfhxJ+H5h1RwwNxzDM+oA8KzpIaDp7 vWkmqnZWFQT9SZE91Cq2+nvoDc/UnGzwE1nwn9tsMjN4McJnUfcI+3h5jeurnXnv WskZ3eWjXCnYqRq0NiF0 =vzfJ -----END PGP SIGNATURE----- --ewlPWiWvx3CGedklU8hFaD8PNjDBehtPX--