Re: Insert into partition table hangs

From: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
To: Nik <XLPizza(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Insert into partition table hangs
Date: 2006-05-23 21:57:00
Message-ID: 20060523215700.GA64371@pervasive.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, May 22, 2006 at 01:38:20PM -0700, Nik wrote:
> CREATE TABLE schemaname.partition_table
> (
> CHECK("start" >= '05-01-2006 00:00:00' AND "start" <= '05-31-2006
> 23:59:59'),

What about 5-31-2006 23:59:59.3?

What you really want is:
CHECK("start" >= '05-01-2006' AND "start" < '06-01-2006')

PostgreSQL will assume midnight, so you don't actually need the time.
--
Jim C. Nasby, Sr. Engineering Consultant jnasby(at)pervasive(dot)com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jim C. Nasby 2006-05-23 22:03:48 Re: Why won't it index scan?
Previous Message George Pavlov 2006-05-23 21:55:03 assymetry updating a boolean (=FALSE faster than =TRUE)