Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1UsFpS-0003hR-Um for pgsql-performance@arkaria.postgresql.org; Thu, 27 Jun 2013 17:17:55 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1UsFpS-0005kP-3h for pgsql-performance@arkaria.postgresql.org; Thu, 27 Jun 2013 17:17:54 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1UsFpR-0005kJ-C0 for pgsql-performance@postgresql.org; Thu, 27 Jun 2013 17:17:53 +0000 Received: from smtp.optionshouse.com ([38.98.137.6] helo=smtp.peak6.com) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1UsFpK-0003Uu-Qe for pgsql-performance@postgresql.org; Thu, 27 Jun 2013 17:17:52 +0000 X-AuditID: 0a64cb20-b7f016d000006b7a-a9-51cc73b64982 Message-ID: <51CC73B6.2050406@optionshouse.com> Date: Thu, 27 Jun 2013 12:17:42 -0500 From: Shaun Thomas Reply-To: Organization: Peak6 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130510 Thunderbird/17.0.6 MIME-Version: 1.0 To: Igor Neyman CC: "pgsql-performance@postgresql.org" Subject: Re: Partitions not Working as Expected References: <51CC652F.3010304@optionshouse.com> In-Reply-To: Content-Type: text/plain; charset="ISO-8859-1"; format=flowed content-transfer-encoding: 7bit X-Originating-IP: [10.10.201.64] X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrGIsWRmVeSWpSXmKPExsXClcIrobu9+EygwbZuZot3634xW1yfeY7Z gcmj9eI0do8L+6axBzBFNTDaJObl5ZcklqQqpKQWJ9sq+ReUZObnFXvklxanKrhkFifnJGbm phYpKWSm2CoZKykU5CQmp+am5pXYKiUWFKTmpSjZcSlgABugssw8hdS85PyUzLx0WyXPYH9d CwtTS11DJbt4ZJDQyZLxd8seloIGtorlf3+zNjA+Yuli5OSQEDCRmPVwBSuELSZx4d56NhCb V0BfYsPKdewgNouAqsSE7U+YQWw2AV2JSf0rwGqEBFQk+s7eYAKx+QWEJfZ9aAKrERUIk3i/ bCorxBxBiZMzn4DtEhHQkFg7pQsszizgKdFxahUjiC0sYClxbfkWFoiZxRKTft4Bi3MKBEjc O3eACaLeVuLCnOssELa8xPa3c5gh6lUlVjRPZIO4X0Hi/5V3TBMYhWYhWT0LSfssJO0LGJlX MYoXlyUmZ2SaFhTnlhQY6RWkJmab6eWllmxiBEfuaYUdjN87rQ4xCnAwKvHwTsw/EyjEmlhW XJl7iFGCg1lJhPeIP1CINyWxsiq1KD++qDQntfgQow8wzCYyS4km5wOTSl5JvKGxqYGppamh qbmpoREOYSVx3n1MywKFBNKBqSQ7NbUgtQhmHBMHp1QD48ZquZ7UGzmqa0J9L9hNXufnZPlC TIhv9YX5WjW7vLm3Rtncm+3VwJ7m/XjTWsl91ze7dvRm8W7je3RR5L79n8tZvm8d/gtJ6rhZ TNb+GdZdIuDju07kV7P1Iifl9X3h9x/V/RP/cttmyeWEX2cLT/NlTWz9WcvouHTyW5HXAmti 495vYux7pcRSnJFoqMVcVJwIAB6/D3QJAwAA X-Pg-Spam-Score: -3.2 (---) 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 12:08 PM, Igor Neyman wrote: > Doesn't have to be hardcoded. > If executed as dynamic sql, it will be re-planned properly, e.g.: Well yeah. That's not really the point, though. Aside from existing code, hard-coding is generally frowned upon. Our devs have been using CURRENT_DATE and its ilk for over six years now. So now I get to tell our devs to refactor six years of JAVA code and find any place they use CURRENT_DATE, and replace it with an ORM variable for the current date instead. At this point I wonder why CURRENT_DATE even exists, if using it is apparently detrimental to query execution. -- Shaun Thomas OptionsHouse | 141 W. Jackson Blvd. | Suite 500 | Chicago IL, 60604 312-676-8870 sthomas@optionshouse.com ______________________________________________ See http://www.peak6.com/email_disclaimer/ for terms and conditions related to this email -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance