Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1UsICj-0002i1-5e for pgsql-performance@arkaria.postgresql.org; Thu, 27 Jun 2013 19:50:05 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1UsICi-0000Rc-Gb for pgsql-performance@arkaria.postgresql.org; Thu, 27 Jun 2013 19:50:04 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1UsICh-0000RH-8n for pgsql-performance@postgresql.org; Thu, 27 Jun 2013 19:50:03 +0000 Received: from relay5-d.mail.gandi.net ([217.70.183.197]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1UsICY-0006eD-8y for pgsql-performance@postgresql.org; Thu, 27 Jun 2013 19:50:02 +0000 Received: from mfilter23-d.gandi.net (mfilter23-d.gandi.net [217.70.178.151]) by relay5-d.mail.gandi.net (Postfix) with ESMTP id CD2C641C056; Thu, 27 Jun 2013 21:49:32 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter23-d.gandi.net Received: from relay5-d.mail.gandi.net ([217.70.183.197]) by mfilter23-d.gandi.net (mfilter23-d.gandi.net [10.0.15.180]) (amavisd-new, port 10024) with ESMTP id i12+v5UrLNPk; Thu, 27 Jun 2013 21:49:31 +0200 (CEST) X-Originating-IP: 98.27.58.255 Received: from [192.168.10.146] (cpe-098-027-058-255.nc.res.rr.com [98.27.58.255]) (Authenticated sender: adsend@dunslane.net) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 0DCAA41C05D; Thu, 27 Jun 2013 21:49:28 +0200 (CEST) Message-ID: <51CC9746.5060804@dunslane.net> Date: Thu, 27 Jun 2013 15:49:26 -0400 From: Andrew Dunstan User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: sthomas@optionshouse.com CC: Tom Lane , Dave Johansen , bricklen , "pgsql-performance@postgresql.org" Subject: Re: Partitions not Working as Expected References: <51CC652F.3010304@optionshouse.com> <51CC73B6.2050406@optionshouse.com> <51CC8160.2080905@optionshouse.com> <27533.1372358546@sss.pgh.pa.us> <51CC8F1A.1090805@optionshouse.com> In-Reply-To: <51CC8F1A.1090805@optionshouse.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: 0.1 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org On 06/27/2013 03:14 PM, Shaun Thomas wrote: > On 06/27/2013 01:42 PM, Tom Lane wrote: > >> That will break things: CURRENT_DATE will then be equivalent to just >> writing today's date as a literal. > > Interesting. I tested it by creating a view and a table with a > default, and it always seems to get translated to: > > ('now'::text)::date > > But I'll take your explanation at face value, since that doesn't imply > what the output would be. What's interesting is that EnterpriseDB has > their own pg_catalog.current_date function that gets called by the > CURRENT_DATE keyword. So unlike in vanilla PG, I could mark just the > current_date function as immutable without affecting a lot of other > internals. > > On EDB, this actually works: > > UPDATE pg_proc > SET provolatile = 'i' > WHERE proname = 'current_date'; But that's a lie, surely. If it breaks you have nobody to blame but yourself. There's a reason EDB haven't marked their function immutable - it's not. cheers andrew -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance