Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search archives
  Advanced Search

Re: how do you get there from here?


  • From: "Michael P. Soulier" <michael_soulier(at)mitel(dot)com>
  • To: pgsql-general(at)postgresql(dot)org
  • Subject: Re: how do you get there from here?
  • Date: Thu, 30 Apr 2009 16:15:02 -0400
  • Message-id: <49FA06C6.5000302@mitel.com> <text/plain>

Tom Lane wrote:
>> Foreign-key constraints:
>>     "dashboard_tuginstance_node_id_fkey" FOREIGN KEY (node_id)
>> REFERENCES nodes(id) DEFERRABLE INITIALLY DEFERRED
> 
> This is what's creating the limitation.

So, I'm working around it by creating the new columns with the default
value that I want populated, and then resetting the default. This works,
but it doesn't feel like a best practice.

Can someone recommend a better way to say, consolidate 3 columns down to
2 and conditionally move contents around to the new columns, inside of a
transaction involving ALTER TABLE calls?

I'm just wondering if there is a better solution than what I've done.

Mike
-- 
Michael P. Soulier <michael_soulier(at)mitel(dot)com>, 613-592-2122 x2522
"Any intelligent fool can make things bigger and more complex... It
takes a touch of genius - and a lot of courage to move in the opposite
direction." --Albert Einstein

Attachment: signature.asc
Description: OpenPGP digital signature



Home | Main Index | Thread Index

Privacy Policy | About PostgreSQL
Copyright © 1996 – 2012 PostgreSQL Global Development Group