X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id C47D9D1C9DB for ; Fri, 6 Feb 2004 17:24:45 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 93710-09 for ; Fri, 6 Feb 2004 13:24:43 -0400 (AST) Received: from alvarezp.ods.org (unknown [200.77.201.28]) by svr1.postgresql.org (Postfix) with ESMTP id 0045BD1CACB for ; Fri, 6 Feb 2004 13:24:40 -0400 (AST) Received: (from apache@localhost) by alvarezp.ods.org (8.11.6/8.11.6) id i16HOrR14772; Fri, 6 Feb 2004 09:24:53 -0800 X-Authentication-Warning: alvarezp.ods.org: apache set sender to alvarezp@alvarezp.ods.org using -f Received: from 192.168.0.64 (SquirrelMail authenticated user alvarezp) by alvarezp.ods.org with HTTP; Fri, 6 Feb 2004 09:24:52 -0800 (PST) Message-ID: <3080.192.168.0.64.1076088292.squirrel@alvarezp.ods.org> In-Reply-To: <4023567E.1020406@klaster.net> References: <4207.192.168.0.64.1076051944.squirrel@alvarezp.ods.org> <40234207.6040207@klaster.net> <4795.192.168.0.64.1076056992.squirrel@alvarezp.ods.org> <4023567E.1020406@klaster.net> Date: Fri, 6 Feb 2004 09:24:52 -0800 (PST) Subject: Re: [PERFORM] Seq scan on zero-parameters function From: "Octavio Alvarez" To: "Tomasz Myrta" Cc: "Lista dyskusyjna pgsql-sql" Reply-To: alvarezp@alvarezp.ods.org User-Agent: SquirrelMail/1.4.0-1.7.x MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 X-Priority: 3 Importance: Normal X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200402/68 X-Sequence-Number: 16759 Tomasz Myrta said: > Dnia 2004-02-06 09:43, U¿ytkownik Octavio Alvarez napisa³: >> Thanks for the hint. >> >> In fact, my current_period_id() is based on time, but it should be >> constant along the query execution. I mean, I don't want some records >> filtered with some values and other with other values... I'll have an >> uncongruent recordset. > > Well - you didn't read the chapter I noticed you, did you? Huummm.. No... :-$ But now I did. Although the chapter makes it look as "how will the optimizer think the function behaves", not "how the function actually behaves". But thanks. It's a lot clearer now. I assume that if I want to make "timeofday" have a stable-behavior, I must enclose it in a sub-query. Am I right? -- Octavio Alvarez. E-mail: alvarezp@alvarezp.ods.org. Agradezco que sus correos sean enviados siempre a esta dirección.