Re: [GENERAL] how to alter an enum type

2007-12-25 Thread Gurjeet Singh
Here's a possible solution (this may take long time if the table is too big). The trick is to add a new column with a newly defined datatype, that picks up values from the old column. Here's the sample psql script (the session output follows after that): create type possible_answers as enum ( 'yes

Re: [GENERAL] Retrying transactions in serializable isolation level

2007-12-25 Thread Alvaro Herrera
Laurent Birtz wrote: > loop > BEGIN; > SELECT hits FROM webpages WHERE url = ...; > -- client internally computes $newval = $hits + 1 > UPDATE webpages SET hits = $newval WHERE url = ..; > if (no error) > break out of loop; > else > ROLLBACK; > end loop > COMMIT; I think you

Re: [GENERAL] Restoring 8.0 db to 8.1

2007-12-25 Thread Usama Dar
On Dec 21, 2007 8:53 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi > > I am trying to upgrade my database from 8.0 to 8.1 and am looking for a > little info/advice. > > This is a production database that we are migrating and it is in CONSTANT > use, so the maintenance window must be small

Re: [GENERAL] slow query

2007-12-25 Thread Usama Dar
On Dec 22, 2007 12:10 AM, Marc <[EMAIL PROTECTED]> wrote: > Hey Folks, > > This query is running really slowly. Sometimes much slower then others. > I have a feeling that there may be contention on one of the indices it is > using. > > Query and explain plan are below. Seems like it spend the mo

Re: [GENERAL] It's serious,Help!

2007-12-25 Thread Farhan Mughal
Please make sure that your Secondary Logon service is running in Control Panel->Administrative Tools->Services --Farhan - Original Message From: 杨雪枫 <[EMAIL PROTECTED]> To: pgsql-general@postgresql.org Sent: Tuesday, 25 December, 2007 5:43:48 PM Subject: [GENERAL] It's serious,Help!

[GENERAL] It's serious,Help!

2007-12-25 Thread 杨雪枫
I have struggle for install postgresql ALL versions,but still not success. Each time it shows "failed to run initdb:1!" at the step init data cluster. My OS is :windows 2003 sp2. sorry for my poor english. ---(end of broadcast)--- TIP 4: Have you sear