X-Original-To: pgsql-bugs-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 1F57ED1B1A9; Tue, 6 Jul 2004 05:59:21 -0300 (ADT) 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 81451-09; Tue, 6 Jul 2004 08:59:14 +0000 (GMT) Received: from amitabha.axelero.hu (fe04.axelero.hu [195.228.240.92]) by svr1.postgresql.org (Postfix) with ESMTP id C54B4D1B19F; Tue, 6 Jul 2004 05:59:10 -0300 (ADT) Received: from amitabha (localhost-02 [127.0.2.1]) by amitabha.axelero.hu (8.12.11/8.12.11) with SMTP id i668x9sC037084; Tue, 6 Jul 2004 10:59:10 +0200 (CEST) Received: from fe04.axelero.hu [127.0.2.1] via SMTP gateway by amitabha [195.228.240.92]; id A090A2E26F5 at Tue, 06 Jul 2004 10:59:06 +0200 Received: from fejleszt4 (121-248-182-81.adsl-fixip.axelero.hu [81.182.248.121]) by fe04.axelero.hu (8.12.11/8.12.11) with SMTP id i668wxHY036742; Tue, 6 Jul 2004 10:59:03 +0200 (CEST) Message-ID: <009101c46337$77f802f0$0403a8c0@fejleszt4> From: "=?iso-8859-2?B?U1rbQ1MgR+Fib3I=?=" To: , Subject: Immutable function in index Date: Tue, 6 Jul 2004 10:58:47 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-2" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by fe04.axelero.hu id i668wxHY036742 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.3 tagged_above=0.0 required=5.0 tests=UPPERCASE_25_50 X-Spam-Level: X-Archive-Number: 200407/51 X-Sequence-Number: 8633 Dear Gurus, Version: PostgreSQL 7.3.3 Log: %----------------------- cut here -----------------------% tir=3D# CREATE INDEX ajanlat_cikk ON ajanlat (antinuller(cikk), antinuller(minoseg), tol); ERROR: parser: parse error at or near "," at character 55 tir=3D# CREATE INDEX ajanlat_szolg ON ajanlat (antinuller(szolgaltatas), to= l); ERROR: parser: parse error at or near "," at character 64 %----------------------- cut here -----------------------% I'm not sure what happened, I'm quite sure it worked before, even with 7.3.3. The index was there and probably worked, but accidentally dropped it and can't recreate. May it be something in postgresql.conf (fumbled with it recently)? May it be a bug in 7.3.3 (despite my memories)? Relevant definitions: %----------------------- cut here -----------------------% CREATE FUNCTION antinuller (int4) RETURNS int4 AS ' SELECT CASE WHEN $1 ISNULL THEN -1 ELSE $1 END;' LANGUAGE 'SQL' immutable; CREATE TABLE ajanlat ( az serial NOT NULL PRIMARY KEY, cikk integer REFERENCES cikk(az) ON UPDATE CASCADE, minoseg integer REFERENCES minoseg(az) ON UPDATE CASCADE, -- a min=F5s=E9g default 1 triggerb=F5l, mert csak ha nem szolg=E1ltat= =E1s! szolgaltatas integer REFERENCES szolgaltatas(az) ON UPDATE CASCADE, tol date DEFAULT now() NOT NULL, ig date DEFAULT '3000-01-01' NOT NULL, CONSTRAINT kitoltes CHECK ((cikk ISNULL =3D minoseg ISNULL) AND (cikk ISNULL =3D szolgaltatas NOTNULL)) ); CREATE INDEX ajanlat_cikk ON ajanlat (antinuller(cikk), antinuller(minoseg), tol); CREATE INDEX ajanlat_szolg ON ajanlat (antinuller(szolgaltatas), tol); %----------------------- cut here -----------------------% TIA, G. %----------------------- cut here -----------------------% \end