Dropping foreign key only if it exists

From: Lukasz Brodziak <lukasz(dot)brodziak(at)gmail(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Dropping foreign key only if it exists
Date: 2011-04-20 10:46:58
Message-ID: BANLkTik9x-BPSy9EC_fj517ze-50T2sTTw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hello,

Is there a way of dropping a FK only if it exists. The thing is that I
don't know if client has this FK on the table or not.

--
Łukasz Brodziak
"What if everyting around You isn't quite as it seems,
What if all the world You think You know is an inelaborate dream
When You look at Your reflection is that all you want it to be
What if You could look right through the cracks
Would You find Yourself...... Find Yourself afraid to see"

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Viktor Bojović 2011-04-20 11:02:50 Re: Dropping foreign key only if it exists
Previous Message rudi 2011-04-20 08:57:48 Re: Streaming replication: rsync to switchover