Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XzqQ0-0005iy-Qu for pgsql-hackers@arkaria.postgresql.org; Sat, 13 Dec 2014 17:23:48 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XzqQ0-0006IP-7W for pgsql-hackers@arkaria.postgresql.org; Sat, 13 Dec 2014 17:23:48 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XzqPz-0006IJ-6u for pgsql-hackers@postgresql.org; Sat, 13 Dec 2014 17:23:47 +0000 Received: from mail-bl2on0614.outbound.protection.outlook.com ([2a01:111:f400:fc09::614] helo=na01-bl2-obe.outbound.protection.outlook.com) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XzqPt-0000Eh-Me for pgsql-hackers@postgresql.org; Sat, 13 Dec 2014 17:23:45 +0000 Received: from decina.attlocal.net (108.232.179.70) by BY1PR11MB0341.namprd11.prod.outlook.com (25.160.206.154) with Microsoft SMTP Server (TLS) id 15.1.36.22; Sat, 13 Dec 2014 17:23:31 +0000 Message-ID: <548C760A.5070904@BlueTreble.com> Date: Sat, 13 Dec 2014 11:23:22 -0600 From: Jim Nasby User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Robert Haas CC: Amit Langote , Amit Kapila , Andres Freund , Alvaro Herrera , Bruce Momjian , Pg Hackers Subject: Re: On partitioning References: <20140829155607.GF7705@eldon.alvh.no-ip.org> <032601d00471$ea6f4280$bf4dc780$@lab.ntt.co.jp> <04da01d00917$2dde1010$899a3030$@lab.ntt.co.jp> <015b01d00eab$56d37700$047a6500$@lab.ntt.co.jp> <002d01d01359$290cb4a0$7b261de0$@lab.ntt.co.jp> <007b01d015c6$373c21e0$a5b465a0$@lab.ntt.co.jp> <548B5E01.5060005@BlueTreble.com> In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [108.232.179.70] X-ClientProxiedBy: BN1PR08CA0013.namprd08.prod.outlook.com (10.242.217.141) To BY1PR11MB0341.namprd11.prod.outlook.com (25.160.206.154) X-Microsoft-Antispam: UriScan:; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:BY1PR11MB0341; X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601003); SRVR:BY1PR11MB0341; X-Forefront-PRVS: 04244E0DC5 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(51704005)(377454003)(479174003)(189002)(199003)(24454002)(80316001)(19580405001)(23676002)(40100003)(1411001)(77156002)(99396003)(83506001)(50466002)(33656002)(86362001)(101416001)(92566001)(65816999)(46102003)(62966003)(50986999)(76176999)(87976001)(64126003)(42186005)(54356999)(87266999)(19580395003)(4396001)(69596002)(122386002)(21056001)(53416004)(120916001)(64706001)(20776003)(65806001)(65956001)(66066001)(47776003)(110136001)(81156004)(106356001)(105586002)(59896002)(97736003)(93886004)(107046002)(68736005)(15975445007)(36756003)(31966008)(3076001)(85282002)(336755003)(18886065003); DIR:OUT; SFP:1101; SCL:1; SRVR:BY1PR11MB0341; H:decina.attlocal.net; FPR:; SPF:None; MLV:sfv; PTR:InfoNoRecords; MX:1; A:1; LANG:en; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:;SRVR:BY1PR11MB0341; X-OriginatorOrg: bluetreble.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Dec 2014 17:23:31.5618 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR11MB0341 X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 12/12/14, 3:48 PM, Robert Haas wrote: > On Fri, Dec 12, 2014 at 4:28 PM, Jim Nasby wrote: >>> Sure. Mind you, I'm not proposing that the syntax I just mooted is >>> actually for the best. What I'm saying is that we need to talk about >>> it. >> >> Frankly, if we're going to require users to explicitly define each partition >> then I think the most appropriate API would be a function. Users will be >> writing code to create new partitions as needed, and it's generally easier >> to write code that calls a function as opposed to glomming a text string >> together and passing that to EXECUTE. > > I have very little idea what the API you're imagining would actually > look like from this description, but it sounds like a terrible idea. > We don't want to make this infinitely general. We need a *fast* way > to go from a value (or list of values, one per partitioning column) to > a partition OID, and the way to get there is not to call arbitrary > user code. You were talking about the syntax for partition creation/definition; that's the API I was referring to. -- Jim Nasby, Data Architect, Blue Treble Consulting Data in Trouble? Get it in Treble! http://BlueTreble.com -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers