Re: Foreign key UI bug - Mailing list pgadmin-support

From Michael Shapiro
Subject Re: Foreign key UI bug
Date
Msg-id AANLkTi=xXfUDpmyeMp+yZN_i8F87icmpjQsgPXY8skeT@mail.gmail.com
Whole thread Raw
In response to Re: Foreign key UI bug  (Guillaume Lelarge <guillaume@lelarge.info>)
Responses Re: Foreign key UI bug
List pgadmin-support
Theoretically, you could have the same problem with the primary key -- there could be an index with that name
already.<br/>But in practice it doesn't happen. You could generate a name for the foreign key based on similar pattern
forthe pk<br /> and if it fails, then it falls on the user to provide a name. Seem like it would work 99% of the time. 
<br/><br /><div class="gmail_quote">On Sat, Nov 20, 2010 at 7:49 AM, Guillaume Lelarge <span dir="ltr"><<a
href="mailto:guillaume@lelarge.info">guillaume@lelarge.info</a>></span>wrote:<br /><blockquote class="gmail_quote"
style="margin:0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><br /> >>>
Well,you could generate the name of the FOREIGN KEY in pgadmin as<br /> >>> well, then you know what it'll
be...Even when the user doesn't specify one.<br /> >>><br /> >>> Another one would be to name the
indexfki_<tablename>_<columnname> or<br /> >>> something like that instead.<br /> >>><br
/>>><br /> >> I thought about it, but rejected it on the idea that you can't be sure<br /> >> the
indexcreation will work (the same index name can already exist).<br /> >> But, thinking more about it, the old
algorithmwasn't better at it anyway.<br /> ><br /></blockquote></div> 

pgadmin-support by date:

Previous
From: Guillaume Lelarge
Date:
Subject: Re: Foreign key UI bug
Next
From: Guillaume Lelarge
Date:
Subject: Re: Foreign key UI bug