X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 5ED8553823 for ; Thu, 7 Apr 2005 13:13:12 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 46656-07 for ; Thu, 7 Apr 2005 12:13:02 +0000 (GMT) Received: from secf.com (209-128-104-244.bayarea.net [209.128.104.244]) by svr1.postgresql.org (Postfix) with ESMTP id 7328453821 for ; Thu, 7 Apr 2005 13:13:01 +0100 (BST) Received: from dinesh by secf.com (MDaemon.PRO.v7.2.2.R) with ESMTP id md50000590413.msg for ; Thu, 07 Apr 2005 05:12:20 -0700 Reply-To: From: "Dinesh Pandey" To: "'Richard Huxton'" Cc: "'PostgreSQL'" Subject: Re: Table PARTITION Date: Thu, 7 Apr 2005 17:39:39 +0530 Organization: Second Foundation India P Ltd. MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.5510 Thread-Index: AcU7aky9eK57pC5EQ06X9bLl2ZOAhAAACZOg X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 In-Reply-To: <42552244.5050603@archonet.com> X-Authenticated-Sender: dpandey@secf.com X-Spam-Processed: mail.secf.com, Thu, 07 Apr 2005 05:12:20 -0700 (not processed: message from valid local sender) X-MDRemoteIP: 220.227.32.11 X-Return-Path: dpandey@secf.com X-MDaemon-Deliver-To: pgsql-sql@postgresql.org X-MDAV-Processed: mail.secf.com, Thu, 07 Apr 2005 05:12:22 -0700 Message-Id: <20050407121301.7328453821@svr1.postgresql.org> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.42 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO, MSGID_FROM_MTA_ID X-Spam-Level: * X-Archive-Number: 200504/73 X-Sequence-Number: 20966 Hi Richard, I am using postgres 8.0.1. It allows us to create TABLESPACE but I don't know how to create PARTITION in postgres. Can you pls tell me little more. Thanks Dinesh Pandey -----Original Message----- From: Richard Huxton [mailto:dev@archonet.com] Sent: Thursday, April 07, 2005 5:36 PM To: dpandey@secf.com Cc: 'PostgreSQL' Subject: Re: [SQL] Table PARTITION Dinesh Pandey wrote: > How can we create oracle's table with partition in Postgres. (How to > create Table partion in postgres) > > CREATE TABLE invoices > (invoice_no NUMBER NOT NULL, > invoice_date DATE NOT NULL, > comments VARCHAR2(500)) > > PARTITION BY RANGE (invoice_date) > (PARTITION invoices_q1 VALUES LESS THAN (TO_DATE('01/04/2001', > 'DD/MM/YYYY')) TABLESPACE users By hand, I'm afraid (although I think people are looking into this feature for version 8.1) There's lots of discussion in the mail archives about how people are handling this. You're basically looking at some combination of - partial/conditional indexes - unions - inheritance -- Richard Huxton Archonet Ltd