X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.193]) by svr1.postgresql.org (Postfix) with ESMTP id EF0E0310A22 for ; Mon, 30 Jun 2003 16:41:26 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr1.postgresql.org [64.117.224.193]) (amavisd-new, port 10024) with ESMTP id 08635-08 for ; Mon, 30 Jun 2003 13:41:16 -0300 (ADT) Received: from tomts16-srv.bellnexxia.net (tomts16.bellnexxia.net [209.226.175.4]) by svr1.postgresql.org (Postfix) with ESMTP id CF5B0310A17 for ; Mon, 30 Jun 2003 13:41:15 -0300 (ADT) Received: from [192.168.1.200] ([216.209.81.133]) by tomts16-srv.bellnexxia.net (InterMail vM.5.01.05.32 201-253-122-126-132-20030307) with ESMTP id <20030630164114.MUYH21124.tomts16-srv.bellnexxia.net@[192.168.1.200]>; Mon, 30 Jun 2003 12:41:14 -0400 Subject: Re: ERROR: ExecEvalExpr: unknown expression type 108 From: Rod Taylor To: Markus Bertheau Cc: postgres sql list , Horst Schwarz In-Reply-To: <1056989417.2297.25.camel@fluor> References: <1056989417.2297.25.camel@fluor> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-B+yyvHwsAzE9ziqTHOt6" Message-Id: <1056991297.28657.74.camel@jester> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.0 Date: 30 Jun 2003 12:41:38 -0400 X-Archive-Number: 200306/340 X-Sequence-Number: 14098 --=-B+yyvHwsAzE9ziqTHOt6 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable > datetest=3D# select * from (select (select count(1) from (select von from > daten union select bis as von from daten) as d1 where d1.von < d2.von) > as number, von from (select von from daten union select bis as von from > daten) d2) as table1 join (select (select count(1) + 1 from (select von > from daten union select bis as von from daten) as d1 where d1.von < > d2.von) as number, von from (select von from daten union select bis as > von from daten) d2) as table2 using (number); > ERROR: ExecEvalExpr: unknown expression type 108 >=20 > Is that a bug? Yes. Regardless of whether this is a valid SQL statement, it shouldn't be caught in this manner. SubSelects have undergone a large simplification by Tom while implementing read-only plans in the executor. This seems to have accidentally fixed this case. rbt=3D# create table daten rbt-# ( id serial not null primary key rbt(# , menge integer rbt(# , von timestamp(0) without time zone rbt(# , bis timestamp(0) without time zone rbt(# ); NOTICE: CREATE TABLE will create implicit sequence 'daten_id_seq' for SERIAL column 'daten.id' NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index 'daten_pkey' for table 'daten' CREATE TABLE rbt=3D# rbt=3D# INSERT INTO daten rbt-# VALUES (DEFAULT, 2, '2000-01-01 10:00:00', '2000-01-01 12:00:00'); INSERT 17132 1 rbt=3D# rbt=3D# rbt=3D# INSERT INTO daten rbt-# VALUES (DEFAULT, 3, '2000-01-01 11:00:00', '2000-01-01 14:00:00'); INSERT 17133 1 rbt=3D# rbt=3D# rbt=3D# INSERT INTO daten rbt-# VALUES (DEFAULT, 1, '2000-01-01 14:00:00', '2000-01-01 15:00:00'); INSERT 17134 1 rbt=3D# rbt=3D# INSERT INTO daten rbt-# VALUES (DEFAULT, 8, '2000-01-01 12:00:00', '2000-01-01 16:00:00'); INSERT 17135 1 rbt=3D# rbt=3D# rbt=3D# INSERT INTO daten rbt-# VALUES (DEFAULT, 4, '2000-01-01 10:00:00', '2000-01-01 11:00:00'); INSERT 17136 1 rbt=3D# rbt=3D# select * from (select (select count(1) from (select von from rbt(# daten union select bis as von from daten) as d1 where d1.von < d2.von) rbt(# as number, von from (select von from daten union select bis as von from rbt(# daten) d2) as bar join (select (select count(1)+1 from (select von from rbt(# daten union select bis as von from daten) as d1 where d1.von < d2.von) rbt(# as number, von from (select von from daten union select bis as von from rbt(# daten) d2) as foo using (number); number | von | von --------+---------------------+--------------------- 1 | 2000-01-01 11:00:00 | 2000-01-01 10:00:00 2 | 2000-01-01 12:00:00 | 2000-01-01 11:00:00 3 | 2000-01-01 14:00:00 | 2000-01-01 12:00:00 4 | 2000-01-01 15:00:00 | 2000-01-01 14:00:00 5 | 2000-01-01 16:00:00 | 2000-01-01 15:00:00 (5 rows) =20 rbt=3D# select version(); version ------------------------------------------------------------------------ PostgreSQL 7.4devel on i386-unknown-freebsd4.8, compiled by GCC 2.95.4 (1 row) --=20 Rod Taylor PGP Key: http://www.rbt.ca/rbtpub.asc --=-B+yyvHwsAzE9ziqTHOt6 Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (FreeBSD) iD8DBQA/AGhB6DETLow6vwwRAt7mAJ4nex7Kftq8DPIfm1leMjWGbuWzjACfesIX KYDpxNa5/x5/bEJNT6GeaXg= =vwa8 -----END PGP SIGNATURE----- --=-B+yyvHwsAzE9ziqTHOt6--