Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id AC4A71A3BCAE for ; Wed, 29 Feb 2012 12:09:25 -0400 (AST) Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1S2m5h-0001O8-P5 for pgsql-sql@postgresql.org; Wed, 29 Feb 2012 16:09:24 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id q1TG8kSo001605; Wed, 29 Feb 2012 11:08:46 -0500 (EST) To: Richard Klingler cc: pgsql-sql@postgresql.org Subject: Re: Natural sort order In-reply-to: <20120228133835204823.bbf29d1f@klingler.net> References: <20111217113306531983.1eb85a86@klingler.net> <20120228133835204823.bbf29d1f@klingler.net> Comments: In-reply-to Richard Klingler message dated "Tue, 28 Feb 2012 13:38:35 +0100" Date: Wed, 29 Feb 2012 11:08:46 -0500 Message-ID: <1604.1330531726@sss.pgh.pa.us> From: Tom Lane X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201202/101 X-Sequence-Number: 36394 Richard Klingler writes: > Took some time until I could try out this... > But as soon I want to create the fcuntion based index it tells me: > Error : ERROR: functions in index expression must be marked IMMUTABLE FWIW, this example works fine for me. Maybe you have some weird user-defined version of substr() or ~ that isn't immutable? regards, tom lane